home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / doors_1 / ds40.zip / DS40.DOC < prev    next >
Text File  |  1991-10-24  |  278KB  |  6,645 lines

  1.  
  2.  
  3.                          Door Source - Version 4.0
  4.                       Copyrighted 1989,1989,1990,1991
  5.                               By Todd Miller
  6.  
  7.                               Support Boards:
  8.            PC-Technologies (Sysop Todd Miller)  (919) 294-1770
  9.           
  10.  
  11.                                Mail Support:
  12.                               PC-Technologies
  13.                               PO Box 77103
  14.                               Greensboro, NC 27417-7103
  15.   Door Source 4.0
  16.   Programmer's Manual - Page 2
  17.                          Table of Contents
  18.  
  19.   Disclaimer and Credits.............................................4
  20.  
  21.   Introduction.......................................................5
  22.  
  23.   The deal on NO registration........................................6
  24.  
  25.   Some Never Nevers..................................................7
  26.  
  27.   Quick Start........................................................8
  28.      Loading Door Source.............................................8
  29.      First few lines.................................................8
  30.  
  31.   Getting Started....................................................10
  32.  
  33.   Command line options...............................................
  34.  
  35.   Door Writing Techniques............................................16
  36.      Gathering data from the user....................................19
  37.      Making friendly menus...........................................20
  38.  
  39.   Finishing your door................................................23
  40.  
  41.   Getting more out of Door Source....................................25
  42.      The definable page sound........................................25
  43.      Two fancier input prompts.......................................26
  44.  
  45.  Advanced Techniques................................................29
  46.      Extra status line...............................................29
  47.      Writing your own I/O routines...................................30
  48.  
  49.   How a door works...................................................32
  50.  
  51.   Converting from 3.2 or before......................................33
  52.  
  53.   Summary of new features............................................34
  54.  
  55.   Appendix A - CALL Syntax...........................................35
  56.  
  57.   Appendix B - Optimizing your door..................................36
  58.  
  59.   Appendix C - Common Questions......................................37
  60.  
  61.   Appendix D - Variable Reference....................................38
  62.  
  63.   Appendix E - Script Commands.......................................41
  64.  
  65.   Appendix F - Command Reference.....................................53
  66.      AdjustTimeLimit.................................................54         
  67.      AllTrun$........................................................55
  68.      ANSIMusic.......................................................56      BackSpace.......................................................57
  69.      BackSpaceOver...................................................58
  70.      BackSpaceToCol..................................................59
  71.      BeepSpeaker.....................................................60
  72.      BlockSend.......................................................61
  73.      Center..........................................................62
  74.      ChangeCTS.......................................................63
  75.      ChangeDTR.......................................................64
  76.      ChangeRTS.......................................................65
  77.      CheckCarrier....................................................66
  78.      CheckTimeLeft...................................................67
  79.      ClrScrn.........................................................68
  80.      ColorEasy.......................................................69
  81.      CommInkey$......................................................70
  82.      CommKeyInkey$...................................................71
  83.      CopyAFile.......................................................72
  84.      DayOfWeek.......................................................73
  85.      DoorBusy........................................................74
  86.      EntryIncomm.....................................................75
  87.      ExtendedCode....................................................76
  88.      ExitDoor........................................................77
  89.      FileExist.......................................................78
  90.      FileOpen........................................................79
  91.      GameInfoUpdate..................................................80
  92.      GetTime.........................................................81
  93.      HighScores......................................................82
  94.      Incomm..........................................................83
  95.      MenuManager.....................................................85
  96.      MoveCursor......................................................86
  97.      NL..............................................................87
  98.      Parser..........................................................88
  99.      PromptIncomm....................................................89
  100.      QSend...........................................................90
  101.      RainbowSend.....................................................91
  102.      RandNum.........................................................92
  103.      ReadUsers.......................................................93
  104.      Send............................................................94
  105.      ShellToDos......................................................95
  106.      Sorter..........................................................96
  107.      SysopPage.......................................................97
  108.      TimeConvert.....................................................98
  109.      ViewFile........................................................99
  110.      WaitASec........................................................100
  111.      WindowInput.....................................................101
  112.      WindowPrint.....................................................102
  113.      Windows.........................................................103
  114.      WriteUsers......................................................104   Door Source 4.0
  115.   Programmer's Manual - Page 4
  116.  
  117.         Disclaimer and Credits
  118.         ----------------------
  119.     This software (including instructions for its use) is provided "as is"
  120.     without warranty of any kine. Further, the author does not warrant,
  121.     guarantee, or make any representations regarding the use, or the results
  122.     of the use, of the software or written materials converning the software
  123.     in terms of correctness, accuracy, reliabilty, currentnes, or otherwise.
  124.     The entire risk as to the results and performance of the software is
  125.     assumed by you. If the software or written materials are defective, you,
  126.     and not the author, or the authors distributors or employees, assume
  127.     the entire cost of all necessary servicing, repair, or correction.
  128.  
  129.     Neither the author nor anyone else who has been involved in the creation,
  130.     production, or delivery of this software shall be liable for any direct,
  131.     indirect, consequential, or incidental damages (including damages for
  132.     loss of business profits, business interruption, loss of business
  133.     information, and the like) arising out of the use of or inability of
  134.     to use such software. Distribution of the software is allowed as long
  135.     as it is in complete form as when you recieved it. Distribution of
  136.     the libraries without the documentation is not allowed.
  137.  
  138.     Sorry for such a long disclaimer, but you have to cover that legal stuff.
  139.  
  140.     QuickBasic (R) is a registered trade mark of Microsoft Corporation
  141.  
  142.     PCBoard (R) is a registered trade mark of Clark Development Company (CDC)
  143.  
  144.     MS-DOS (R) is a registered trade mark of Microsoft Corporation
  145.  
  146.     Door Source is copyrighted Computer City, USA 1988, 1989, 1990, 1991
  147.  
  148.  
  149.     Troy Getty - For helping in the testing of 4.0 and suggesting a
  150.         badly needed routine, ShellToDOS.
  151.  
  152.     Daniel Sharpe - For letting us put the RainbowSend command into Door
  153.         Source.
  154.  
  155.     Premo Mondone - Who has given me suggestions for 3.0 and above
  156.  
  157.     To all my competitors - Who give me inspiration to make this product
  158.         better than theirs. (And cheaper too!)
  159.   Door Source 4.0
  160.   Programmer's Manual - Page 5
  161.  
  162.         Introduction
  163.         ------------
  164.            Welcome to Door Source! Door Source is a Quick Basic library,
  165.     intended for using with versions 4.0 and above. Door Source provides
  166.     you with a collection of routines to help you interface with a bulletin
  167.     board and the communications port to make a "door", or otherwise
  168.     referred to as a third party program, that adds onto the board.
  169.            Some people don't like having to read a large manual, and rather
  170.     jump right in with both feet and start off, if you would like to quickly
  171.     start, please read the following two sections after this introduction.
  172.     It is advised however, that you read Door Writing Techniques, and
  173.     Getting More out of Door Source too. If you have previously used
  174.     Door Source, you should refer to Converting from 3.2 or before and
  175.     also to the Summary of New Features. Door Source will also be
  176.     referred to as DS in this manual.
  177.            Door Source is provided to you free of charge, and you can
  178.     receive technical support at (919) 294-1770 (DATA 2400 max).
  179.     Door Source users will be given free access to the other nodes
  180.     after first calling the number above.
  181.  
  182.         Files included
  183.         --------------
  184.            Here is a list of files that you should have:
  185.  
  186.                 DS40    .DOC - Door Source 4.0 documentation
  187.                 DOORSORC.INT - Door Source 4.0 include file
  188.                 DSGAME  .INT - Door Source 4.0 include file
  189.                 WINDDEMO.BAS - Window demo using the Window routine
  190.                 MENUDEMO.BAS - Menu demo using the MenuManager routine
  191.                 PRMTDEMO.BAS - Prompts demo using various input routines
  192.                 BLCKDEMO.BAS - A demo using the UserBlock type declaration
  193.                 ERRDEMO .BAS - A demo with the CarrierLossError variable
  194.                 SAMPLE  .BAS - A sample door program written with Door Source
  195.                 MANUAL  .FRM - A form to order a printed manual with disks
  196.                 LOADQB  .BAT - A batch file to make loading DS easier
  197.                 DS00x   .DS4 - These are special files with extra routines
  198.                 DSINST  .EXE - This will help you select the right object
  199.                                files for the most compact DS library.
  200.                 DSINST  .DOC - Documentation on how to use the installer
  201.                 COMPRESS.ZIP - A program to compress the HighScores data files
  202.                 DOORINST.ZIP - A program to install your doors on other boards
  203.   Door Source 4.0
  204.   Programmer's Manual - Page 6
  205.  
  206.         The deal on NO registration
  207.         ---------------------------
  208.            This may seem extremely odd, but Door Source is offered 100%
  209.         completely free. There are no registration fees, no more forms,
  210.         you don't ever have to send us a thing!
  211.            Why? Many years ago when Door Source was first started on,
  212.         I realized the need for a better product in the field of door
  213.         tool kits, and I decided that I would try to fill that gap, but
  214.         at no charge. All the other door kits (that I know of) ask for
  215.         some kind of registration, and I think this is truly one of the
  216.         first that requires none at all.
  217.            But I do like to know who is using Door Source, and a call to
  218.         PC-Technologies just to say thanks, or, better yet, to give a
  219.         suggestion for improvements, is always appreciated! If you have
  220.         a specific need for a routine or improvement to the Door Source
  221.         library, you can call and tell it to me, and you're guaranteed
  222.         that 90% of all improvements or suggestions are added within a
  223.         few releases!
  224.  
  225.   Door Source 4.0
  226.   Programmer's Manual - Page 7
  227.  
  228.         Some Never Nevers
  229.         -----------------
  230.            There are some things you never should do when using Door Source.
  231.         What you shouldn't do is listed below, and since most people won't
  232.         believe it unless they know why, we have included reasons, and
  233.         in some cases, alternate routines to use instead.
  234.  
  235.         Never use CLS, VIEW PRINT, PRINT, LOCATE, or COLOR because
  236.            Door Source handles all screen output, and using these
  237.            will cause Door Source to lose some of its pointers on the
  238.            screen. Also, on systems using DesqView, it could cause lock ups.
  239.  
  240.         Never use OPEN COM or ON COM, because Door Source doesn't use
  241.            Quick Basic's communication routines, and using these would
  242.            cause a confliction of interrupts between Door Source and
  243.            Quick Basic, that would lead to unpredictable results.
  244.  
  245.         Never use SCREEN, because Door Source handles screen output,
  246.            it wouldn't be able to follow your change to a different
  247.            mode, and would cause serious problems.
  248.  
  249.         Never use END or SYSTEM, because that would cause Door Source
  250.            to leave its interrupt handlers still in place and the
  251.            next program to run would probably crash.
  252.  
  253.         Never use DEFINT, or any of DEF beside DEF FN, because
  254.            Door Source expects variables to be passed that are in
  255.            single precision format (the default of Quick Basic).
  256.  
  257.         Never use PLAY or SOUND, because it will cause a sound
  258.            when the sysop using your door program may not want sound,
  259.            like in the middle of the night, use BeepSpeaker instead
  260.            of BEEP or SOUND, and AnsiMusic instead of PLAY.
  261.  
  262.   Door Source 4.0
  263.   Programmer's Manual - Page 8
  264.   
  265.      Quick Start
  266.      -----------
  267.  
  268.         Installing and loading Door Source
  269.         ----------------------------------
  270.            After you have unzipped the Door Source file (assuming that you
  271.         have since you're reading this), you will only need to copy a few
  272.         files into your Quick Basic sub-directory. All you will need to
  273.         copy is DS40.QLB, DS40.LIB, and DOORSORC.INT. Now you are ready
  274.         to load up Quick Basic, which you can do by typing:
  275.  
  276.            QB [your program name] /L DS40
  277.  
  278.            You also can add on a /CMD[command$ string] that would place
  279.         what you put there into COMMAND$ inside Quick Basic. This would
  280.         be used to easily specify your configuration file for the door,
  281.         an example is this:
  282.  
  283.            QB MYDOOR /L DS40 /CMDTESTDOOR.CFG LOCAL
  284.  
  285.            Putting a space in between the /CMD and TESTDOOR.CFG will
  286.         cause Door Source not to recognize your configuration file
  287.         properly.
  288.  
  289.         The First Few Lines
  290.         -------------------
  291.            Once inside the Quick Basic environment, ready to write a
  292.         new door program, the first line should always be:
  293.  
  294.         ' $INCLUDE:'DOORSORC.INT'
  295.  
  296.            This will tell Quick Basic to include this file into your
  297.         program. What this file contains is declarations for the
  298.         Door Source routines (to help eliminate errors), a COMMON SHARED
  299.         block, along with a few CONSTant declarations. At the end of the
  300.         file, it calls the InitDoor routine, which starts Door Source
  301.         rolling. The next line after that in your program should be:
  302.  
  303.         PROGNAME$ = "My Door"
  304.  
  305.            You should replace "My Door" with the name of your door. But
  306.         make sure that it is in quotations, or Quick Basic will give you
  307.         a Type mismatch error. The name placed in this string shouldn't
  308.         exceed 20 characters. The next line should be:
  309.  
  310.         RELEASE$ = "1.0"
  311.  
  312.            This is the release number (or version number) of your door
  313.         program. It should be less than 6 characters long, and can contain
  314.         letters and numbers (A-Z, a-z, 0-9), as well as punctuation.
  315.   Door Source 4.0
  316.   Programmer's Manual - Page 9
  317.  
  318.         CALL ClrScrn
  319.  
  320.            CALL ClrScrn should be the next line in your program. It will
  321.         clear the screen, and now you almost ready to go on about your
  322.         door, however, there is one last thing. In the DOORSORC.INT, when
  323.         it calls InitDoor, it will leave a file open for you (file number 1)
  324.         and this file is the configuration file. If you would like to
  325.         INPUT anything from it, do that here, and once you are done inputing
  326.         anything else that was added onto the configuration file, or if
  327.         you didn't input anything at all, you will need to add one last
  328.         line, which is:
  329.  
  330.         CLOSE #1
  331.  
  332.            Now you are ready to write your door. A few basic routines that
  333.         you should look up are Send (on page XX), Incomm (on page XX),
  334.         ClrScrn (on page XX), and NL (on page XX). I'm sure you are
  335.         sick of reading this manual by now, but these are the 4 most
  336.         basic commands. You should also read Testing Your Door before you
  337.         try to run the door for the first time, because there are a few
  338.         things to make sure that you have in your program, and on your
  339.         disk in order for it to work.
  340.   Door Source 4.0
  341.   Programmer's Manual - Page 10
  342.  
  343.         Getting Started
  344.         ---------------
  345.  
  346.         Writing a simple program in Door Source
  347.         ---------------------------------------
  348.            Before loading Quick Basic, make sure that you have set the
  349.         proper environment strings to direct Quick Basic to your Door
  350.         Source directory (if you have one).
  351.            You will also need to make a configuration file that you
  352.         can use to test a simple door with. The Door Source configuration
  353.         file format is a simple four line file. You can make it longer
  354.         if your door needs information from it (see Advanced Techniques).
  355.         An example configuration file might be called TESTDOOR.CFG and look
  356.         like this:
  357.  
  358.         C:\PCB\PCBOARD.SYS
  359.         PC-Technologies
  360.         Todd
  361.         Miller
  362.  
  363.            The first line is a drive/path/filename to the bbs interface file,
  364.         and the second line is the name of the bbs using the door. The third
  365.         line is the first name of the sysop and the fourth line is the last
  366.         name of the sysop.
  367.            Now, load up Quick Basic, with the /L (library) switch on it like
  368.         this:
  369.  
  370.         QB /L DS40
  371.  
  372.            That will load up Quick Basic and the Door Source library. Two other
  373.         switches that you might use when loading Quick Basic are:
  374.  
  375.         /RUN             - This is put at the beginning of the line right after
  376.                            QB and will make Quick Basic run the file specified.
  377.         /CMDMYCONFIG.CFG - The /CMD option always comes at the end, and what
  378.                            comes DIRECTLY after the /CMD will be loaded into
  379.                            the COMMAND$, this simulates what you would have
  380.                            if someone loaded your program like this:
  381.                            MYDOOR MYCONFIG.CFG
  382.                            The MYCONFIG.CFG would be put in the COMMAND$, but
  383.                            if you want to test doors inside Quick Basic, you
  384.                            should use this option, or set the COMMAND$ from
  385.                            the Run menu in Quick Basic.
  386.  
  387.            Once Quick Basic is loaded, you should press ALT-R to get the
  388.         Run menu, and the select Modify COMMAND$ (If it isn't listed, then
  389.         go to the options menu and select Full Menus, then try again). Now
  390.         enter in the name of the configuration file that you made earlier
  391.         before loading (If you didn't make it, you can shell to dos from the
  392.         File menu and make it there). Put after the configuration filename,
  393.   Door Source 4.0
  394.   Programmer's Manual - Page 11
  395.  
  396.         the word LOCAL. LOCAL will tell Door Source to read the configuration
  397.         file, but not to use the BBS interface file. Door Source will prompt
  398.         you for a name, and if you want to use ANSI graphics. This way, you
  399.         don't have to worry about making a test PCBOARD.SYS, DORINFO1.DEF,
  400.         CALLINFO.BBS, or DOOR.SYS. If you didn't specify LOCAL, it would look
  401.         for the bbs interface file that you gave it.
  402.            Now type the following program into Quick Basic:
  403.  
  404.         ' $INCLUDE:'DOORSORC.INT'
  405.         PROGNAME$="Hello World"
  406.         RELEASE$="1.0"
  407.         CALL ClrScrn
  408.         CLOSE #1
  409.  
  410.         CALL Send("Hello World!",No,Yes,10)
  411.         CALL Incomm("How are you today, @FIRST@ ?",No,No,14)
  412.         CALL ExitDoor
  413.  
  414.            Press the F5 key and the program will run. If you receive an
  415.         error, refer to Common Questions to find a solution. You should
  416.         see Door Source ask you for a name, and if you want ANSI graphics.
  417.         Then the screen will clear and it will say Hello World! in High
  418.         Intensity Green, and the beneath that it will show How are you today,
  419.         with your first name. Enter in anything you want and press enter.
  420.         It will then say Closing Door... and more. You'll also notice that
  421.         at the bottom of the screen is a status line, and it will be
  422.         discussed later in this section. Now let's find out how this
  423.         program works.
  424.            First, the INCLUDE file has a lot of DECLAREs in it and a
  425.         COMMON SHARED block, it also makes a CALL to the Door Source
  426.         routine InitDoor. Inside InitDoor, Door Source will read the
  427.         configuration file, process the bbs interface file (in this
  428.         case, it will ask you for your name and if you want ANSI
  429.         instead), and it will set up the communications port if it
  430.         is going to be used.
  431.            In the next two lines, you set up two variables. PROGNAME$
  432.         should be the name of your program. RELEASE$ should be the
  433.         version number of your program. Door Source will display these
  434.         on the status line. PROGNAME$ shouldn't be bigger than 20 characters
  435.         and RELEASE$ shouldn't be bigger than 5 characters. They both
  436.         can contain A-Z, a-z, 0-9, and punctuation.
  437.            Then you make a call to the Door Source routine ClrScrn, which
  438.         clears the screen (local and remote), and updates the status line.
  439.         At this point, if you had added onto the configuration file, you
  440.         would read it here, but since we didn't, we just close the file
  441.         that InitDoor left open for us.
  442.   Door Source 4.0
  443.   Programmer's Manual - Page 12
  444.  
  445.            The first four lines of the program above should be the first
  446.         four lines in all of your doors, except you would replace what
  447.         PROGNAME$ and RELEASE$ with information for your door.
  448.            Send is a Door Source routine that outputs (local and remote)
  449.         a string, and can optionly beep the speaker, and send a enter when
  450.         done. The number is the color number, here's the format for calling
  451.         Send.
  452.  
  453.         CALL Send("Hello World!", No, Yes, 10)
  454.                    ^              ^   ^    ^
  455.                    |              |   |    Color to use
  456.                    |              |   Send enter when done?
  457.                    |              Beep the speaker when done?
  458.                    What to output
  459.  
  460.            Incomm is another routine that outputs first and then waits
  461.         for input back. There are many options that you can use with
  462.         Incomm, most which are in global variables, which are covered
  463.         in the reference for it. Here's the way to call Incomm:
  464.  
  465.         CALL Incomm("How are you today, @FIRST@ ?", No, No, 14)
  466.                      ^                              ^   ^   ^
  467.                      |                              |   |   Color to use
  468.                      |                              |   Limit the length? If
  469.                      |                              |   so, max length.
  470.                      |                              Send enter before input?
  471.                      What to output first
  472.  
  473.            You may have noticed how @FIRST@ wasn't displayed on the screen,
  474.         but your first name was instead. That's because that when Door Source
  475.         sees one of these, it knows to replace it with what you want instead.
  476.         There is a complete list of these in Appendix D.
  477.            The last call is to ExitDoor, which closes up Door Source files
  478.         and removes the Door Source interrupt handlers. If you use END
  479.         instead of ExitDoor, then the interrupt handlers will remain in
  480.         place, causing the next program to run to crash. ExitDoor will
  481.         also insure that the caller stays connected while he/she is transferred
  482.         back to the bbs.
  483.  
  484.   Door Source 4.0
  485.   Programmer's Manual - Page 13
  486.  
  487.         Colors
  488.         ------
  489.            Door Source can support foreground and background colors. There
  490.         are three different ways that you can use and change colors too.
  491.         Here's a color chart:
  492.  
  493.         #       Name           Hex     Foreground   Background
  494.         0       Black           0          Y            Y
  495.         1       Blue            1          Y            Y
  496.         2       Green           2          Y            Y
  497.         3       Cyan            3          Y            Y
  498.         4       Red             4          Y            Y
  499.         5       Magenta         5          Y            Y
  500.         6       Brown           6          Y            Y
  501.         7       White           7          Y            Y
  502.         8       Gray            8          Y            N
  503.         9       HiBlue          9          Y            N
  504.         10      HiGreen         A          Y            N
  505.         11      HiCyan          B          Y            N
  506.         12      HiRed           C          Y            N
  507.         13      HiMagenta       D          Y            N
  508.         14      Yellow          E          Y            N
  509.         15      HiWhite         F          Y            N
  510.  
  511.         Way #1 to use color
  512.         -------------------
  513.            CALL Send("Hello!",No,No,12)
  514.            CALL Send("Bye!",No,Yes,10)
  515.  
  516.            This would output Hello! in high intensity red and on the same
  517.            line it would put Bye! in high intensity green.
  518.  
  519.         Way #2 to use color
  520.         -------------------
  521.            CALL Send("Hello!",No,Yes,HiRed)
  522.            CALL Send("Bye!",No,Yes,HiGreen)
  523.  
  524.            This would output the same thing as above, the only difference
  525.            is that it is easier to read.
  526.  
  527.         Way #3 to use color
  528.         -------------------
  529.            CALL Send("Hello!@X0ABye!",No,Yes,12)
  530.  
  531.            This would output the same as the first and second way, but
  532.            this one does it with one string. The whole key to this method
  533.            is the @X0A code in the middle. It tells Door Source to change
  534.            colors.
  535.  
  536.   Door Source 4.0
  537.   Programmer's Manual - Page 14
  538.  
  539.         Color Code
  540.         ----------
  541.            Here's how to use the special color codes:
  542.  
  543.                 @X0F
  544.                 ^^^^
  545.                 |||Foreground color
  546.                 ||Background color
  547.                 |Second part of signal code
  548.                 First part of signal code
  549.  
  550.            You can also change the background color by setting the
  551.            variable BackGroundColor to a color number on the chart
  552.            above that is valid a background color (0-7).
  553.  
  554.         Command Line Options
  555.         --------------------
  556.            Door Source has numerous command line options in order to provide
  557.         flexibility with most computer systems. Here is a list:
  558.  
  559.                 LOCAL       - Forces Door Source to run in local mode. This
  560.                               is really meant for testing purposes, but it
  561.                               still reads the configuration file, but doesn't
  562.                               read the bbs interface file.
  563.                 NETWORK     - Forces file sharing to be active incase you
  564.                               are using something other than SHARE to manage
  565.                               file locking.
  566.                 IRQ=n       - Lets you change the IRQ used for the com port
  567.                               specified in the bbs interface file.
  568.                               (See below for more information)
  569.                 ADDR=&Hnnnn - Lets you change the address used for the com
  570.                               port specified in the bbs interface file.
  571.                               (See below for more information)
  572.                 PS2         - Forces the PS/2 IRQs and addresses if a PS/2
  573.                               isn't detected (Normally it is, but you can't
  574.                               always tell!)
  575.                 RBBS        - Forces Door Source into RBBS/QBBS mode
  576.                 WILDCAT     - Forces Door Source into Wildcat 2.0 mode
  577.                 DOORSYS     - Forces Door Source into 31-Line DOOR.SYS mode
  578.                 PCB121      - Forces Door Source into PCBoard 11.8/12.x mode
  579.                               with COM 1 active
  580.                 PCB122      - Forces Door Source into PCBoard 11.8/12.x mode
  581.                               with COM 2 active
  582.                 PCB14       - (DEFAULT) Forces Door Source into PCBoard 14.x
  583.                               mode
  584.  
  585.   Door Source 4.0
  586.   Programmer's Manual - Page 15
  587.  
  588.         When you use the IRQ or the ADDR option, you must include the other.
  589.         You can't use just the IRQ and not the ADDR, and you can't use just
  590.         the ADDR and not the IRQ. Here's a chart with the STANDARD IRQs
  591.         and addresses for the PS/2s and IBM PCs:
  592.                                 Non PS/2
  593.                 Com port       IRQ     Address
  594.                    1             4       &H3F8
  595.                    2             3       &H2F8
  596.                    3             4       &H3E8
  597.                    4             3       &H2E8
  598.                   5-8            4       &H3F8
  599.  
  600.                                 PS/2
  601.                 Com port       IRQ     Address
  602.                    1             4       &H3F8
  603.                    2             3       &H2F8
  604.                    3             3       &H3220
  605.                    4             3       &H3228
  606.                    5             3       &H4220
  607.                    6             3       &H4228
  608.                    7             3       &H5220
  609.                    8             3       &H5228
  610.  
  611.   Door Source 4.0
  612.   Programmer's Manual - Page 16
  613.  
  614.         Door Writing Techniques
  615.         -----------------------
  616.            When writing a door, you should keep three concepts in mind, they
  617.         are:
  618.  
  619.         1) Compatibility
  620.         2) Flexibility
  621.         3) Multi-node
  622.  
  623.            A compatible door is a door that easily runs on several bbs types.
  624.         Door Source currently supports PCBoard 11.8+, PCBoard 14.x, WildCat,
  625.         RBBS/QBBS DORINFO1.DEF, and the 31-line version of DOOR.SYS. Modifying
  626.         specific detailed parts of the user's information makes the door
  627.         less portable, since not all systems have the same information as
  628.         others.
  629.            A flexible door is one that allows the sysop to EASILY tell the
  630.         game where things are, and to set the options that they want.
  631.         Options like a tournament mode, turns per day, plays per day, etc,...
  632.         are good options to have. Letting the sysop define text from the
  633.         door is stretching this a little, but some sysops like this feature.
  634.         Of course it does mean a lot of work on your part too.
  635.            A multi-node door is often the hardest to write, but not if you
  636.         know how. Really it is very easy, easier than most think. You first
  637.         have to decide how multi-node you want your door to get. For example,
  638.         you might not won't to try to program something to let two players
  639.         on at the same time attack each other, so maybe you don't let on
  640.         go into the same sector as another that is currently on, or you
  641.         could go for the more complex way and do a one-on-one active battle
  642.         mode (which players would like). But the one thing all multi-node
  643.         doors must do is to share files correctly, and the way to do this
  644.         is to open files as SHARED, and to LOCK and UNLOCK individual records.
  645.         You will also want to keep in contact with other nodes playing
  646.         your door at the same time, and this can be done with a simple file
  647.         that would be organized by node. It would tell the other nodes if
  648.         it was running maintenance (so the others would play while it was), or
  649.         to tell the other nodes where someone is. In the Door Source Door
  650.         tool kit, it contains routines to maintain a file, and others to
  651.         help make your door more multinode. A multi-node door is always
  652.         praised by the sysops of a multi-node system.
  653.  
  654.         Quick Basic problems
  655.         --------------------
  656.            Quick Basic does have a few problems, and you will encounter them
  657.         if you are working on a large door project. You will probably
  658.         encounter a "Out of Stack Space" or a "Out of Data Space" error.
  659.         I've found that exiting to DOS and then coming back will usually
  660.         solve the problem. If not, then its time to do some work on your
  661.         program. If you know that you're door will be large, or if your
  662.         door gets larger than you expected, then here are a few tips on
  663.         how to get rid of these problems, or to prevent them:
  664.   Door Source 4.0
  665.   Programmer's Manual - Page 17
  666.  
  667.                 1) Use variables, not constants. When you call a routine,
  668.                    like Send, and pass it a constant, the space that the
  669.                    constant used is not released for other programs to use.
  670.                    Instead, it stays in memory until your program quits.
  671.                    So call Send or other routines this way, by defining your
  672.                    variable first.
  673.  
  674.                         Lin$="Hello!":ColorToUse=10
  675.                         CALL Send(Lin$, No, Yes, ColorToUse)
  676.  
  677.                    If you didn't set up the variables before hand, you
  678.                    would have just used up 12 bytes of stack space that
  679.                    wouldn't be made available for other things. (I didn't
  680.                    miscount, a string has a 4 byte discriptor on it.)
  681.  
  682.                 2) Use MAKEDS so that your Door Source library will be
  683.                    as small as possible, and so it won't take up extra
  684.                    space with routines you don't need.
  685.  
  686.                 3) Use as few variables as possible. You should set aside
  687.                    two or three variables for your loops, a few for input,
  688.                    and a few for output, etc,... Just don't go around
  689.                    putting in new variables, because it will eliminate
  690.                    stack space.
  691.  
  692.                 4) If you are using your own COMMON SHARED block, eliminate
  693.                    all unnecessary variables from it, and don't declare
  694.                    a function or subroutine as STATIC unless necessary.
  695.  
  696.         Large doors
  697.         -----------
  698.            When writing LARGE doors with Door Source, you should use
  699.         a multi-module program. To create a new module, you must select
  700.         the Create file option from the file menu (full menus only).
  701.         Here are some tips for writing large doors:
  702.  
  703.                 1) Make a COMMON SHARED block for each of your modules
  704.                    that has commonly used variables.
  705.  
  706.                 2) Include the DOORSORC.INT at the beginning of each module
  707.                    so that it can use the Door Source routines and variables.
  708.  
  709.                 3) Make as many things as possible a routine or a function,
  710.                    and place those routines and functions into a module of
  711.                    their own (You could even have several modules of routines).
  712.  
  713.                 4) Remember that you can't GOTO or GOSUB to a line number or a
  714.                    label in another module.
  715.  
  716.   Door Source 4.0
  717.   Programmer's Manual - Page 18
  718.  
  719.                 5) Anything that is done more than once is a good candidate for
  720.                    routine or function, even if it just calculates a score
  721.                    or shows lots of information.
  722.  
  723.                 6) When calling routines (Door Source or your own), pass
  724.                    variables, not constants to them.
  725.  
  726.   Door Source 4.0
  727.   Programmer's Manual - Page 19
  728.  
  729.         Gathering Data from the User
  730.         ----------------------------
  731.            When writing your door, you will want to keep a consistent, but
  732.         friendly and easy to use approach to receiving information back from
  733.         the user. Using the PromptIncomm or EntryIncomm is a good way to
  734.         gather a limited amount of data, PromptIncomm is most useful for
  735.         yes and no questions, and for amounts. EntryIncomm is good for
  736.         long replies (sentences, names, etc,...).
  737.            You can also vary Incomm in a number of ways, the Incomm routine
  738.         is the kernel for PromptIncomm and EntryIncomm. You can write your own
  739.         routine to first do your special prompt and then call Incomm. For
  740.         example, if you wanted to make a prompt that used RainbowSend so the
  741.         prompt is lots of different colors, you could do this:
  742.  
  743.         SUB RainbowInput(Text$, LimitField)
  744.            CALL RainbowSend(Text$, No, No, 11)
  745.            CALL Incomm("", No, LimitField, Last.Clr.Used)
  746.         END SUB
  747.  
  748.            This would be output Text$ (the prompt) using RainbowSend first,
  749.         then use Incomm to receive the data. The variable, Last.Clr.Used, is
  750.         a Door Source variable that has the number of the last color used
  751.         stored in it.
  752.            If you have specific keys that you want the user to use and to
  753.         lock out the others, use the Table$ and Default.Table$ to limit
  754.         the input to certain keys, for example:
  755.  
  756.            Table$="YN"
  757.            CALL Incomm("Do you want to quit (Y/N) ? ", No, 1, 14)
  758.            Table$=Default.Table$
  759.  
  760.            The above example first sets Table$ to equal YN, now Door Source
  761.         will only allow the user to input the letters Y and N (Lower case
  762.         will NOT work, you have to add in the lower case letters too!).
  763.         The last line sets Table$ back to the default (when Door Source
  764.         starts, Table$ is already at the default). This is very important
  765.         so that you don't accidentally keep limiting input when you don't
  766.         want to. Also, NEVER change Default.Table$, doing so will make it
  767.         only harder on you to undo the Table$ setting. You don't have to
  768.         worry about adding in characters like backspace or enter, because
  769.         Door Source assumes that you will want to let the user use those
  770.         keys. Table$ does not affect any output routines, only the Door
  771.         Source input routines (except CommInkey$ and CommKeyInkey$ functions)
  772.  
  773.   Door Source 4.0
  774.   Programmer's Manual - Page 20
  775.  
  776.         Making friendly menus
  777.         ---------------------
  778.            Friendly menus (to you and the user) are menus that can be
  779.         aborted in the middle of display. To make a friendly menu in
  780.         Door Source, define a array and put your menu in it. This also
  781.         makes it easy for you to make a quick change to one or all of
  782.         your menus if you have all of the arrays in the same place.
  783.         An example of how to make a friendly menu would be:
  784.  
  785.         CONST Main.Menu.Length = 5
  786.  
  787.         DIM Main.Menu$(5)
  788.  
  789.         Main.Menu$(1)="(1) Quit"
  790.         Main.Menu$(2)="(2) Quit"
  791.         Main.Menu$(3)="(3) Quit"
  792.         Main.Menu$(4)="(4) Quit"
  793.         Main.Menu$(5)="(5) Quit"
  794.  
  795.         CALL BlockSend(Main.Menu$(), No, Main.Menu.Length)
  796.  
  797.            If the user was to press the space bar, CTRL-X, or CTRL-K while
  798.         the menu was displaying, it would stop displaying and let your
  799.         program go on to receive the input.
  800.            Another form of the friendly menu (but doesn't allow aborting)
  801.         is using MenuManager to display your menu, and allows ANSI users to
  802.         use a scroll bar to scroll up and down and make their choice, and
  803.         allows non-ANSI users to enter their selection.
  804.  
  805.         Presenting information in a compact format
  806.         ------------------------------------------
  807.            Displaying ten, twenty character long lines, on ten separate lines
  808.         is a waste of space. Instead, you could compact the display to five
  809.         lines, or even less. Setting TabSpace in between calls to one of the
  810.         Send routines will let you make a nicely formatted display, for example:
  811.  
  812.            CALL Send("Info #1:"+Info1$, No, No, 10)
  813.            TabSpace = 40
  814.            CALL Send("Info #2:"+Info2$, No, Yes, 10)
  815.            CALL Send("Info #3:"+Info3$, No, No, 10)
  816.            TabSpace = 40
  817.            CALL Send("Info #4:"+Info4$, No, Yes, 10)
  818.  
  819.         Would look like:
  820.  
  821.         Info #1: Something                      Info #2: Something else
  822.         Info #3: Anything                       Info #4: Anything else!
  823.  
  824.   Door Source 4.0
  825.   Programmer's Manual - Page 21
  826.  
  827.            If you want to display information from an array in a compact
  828.         format, you could do this:
  829.  
  830.            Stack = 0
  831.            FOR X = 1 TO 10
  832.               IF Stack = 0 THEN
  833.                  CALL Send("Info :"+Info$(X), No, No, 10)
  834.                  TabSpace = 40
  835.                  Stack = 1
  836.               ELSE
  837.                  CALL Send("Info :"+Info$(X), No, Yes, 10)
  838.                  Stack = 0
  839.               END IF
  840.            NEXT X
  841.            IF TabSpace = 40 THEN TabSpace = 0
  842.  
  843.            In the above example, the variable Stack changes from 0 to 1 and
  844.         back again to keep track of whether or not it's time to tab over to
  845.         column 40 or to end the line. The IF after the NEXT X makes sure that
  846.         you aren't set at column 40 for your next output when you don't want
  847.         to be.
  848.            You could also put in another IF block inside the FOR loop to let
  849.         you decide whether or not you have any information to display or not.
  850.         You could also modify all the above examples so that you could have
  851.         three columns and not just two.
  852.  
  853.         The Configuration File
  854.         ----------------------
  855.            You can make the configuration file for your door program larger
  856.         than what Door Source requires it to be, and you can read in the
  857.         information yourself too. Door Source automatically reads in the
  858.         first four lines of the configuration file and sets everything up
  859.         for you to read the rest. Reading more from the configuration file
  860.         is simple:
  861.  
  862.         ' $INCLUDE:'DOORSORC.INT'
  863.         ProgName$="Configuration Reader"
  864.         Release$="1.0"
  865.         LINE INPUT #1, ExtraInfo$
  866.         LINE INPUT #1, ExtraNumber
  867.         CLOSE #1
  868.         CALL ClrScrn
  869.  
  870.            Even though there is no open statement, Door Source opened the
  871.         file and read the information from it already (It did this from in
  872.         the DOORSORC.INT). Remember to close the file after use, even if you
  873.         don't use it at all. The only limit to how long your configuration
  874.         file can be is the disk space and the amount of memory you can
  875.         use to store the information. The configuration file can not be
  876.         in a random access format, only sequential.
  877.   Door Source 4.0
  878.   Programmer's Manual - Page 22
  879.  
  880.         Testing your Door
  881.         -----------------
  882.            The easiest way to test your door is to run it from inside the
  883.         Quick Basic environment. You first have to have three things done
  884.         so that you can, and they are:
  885.  
  886.                 1) Have a sample configuration file in the Quick Basic
  887.                    directory.
  888.  
  889.                 2) Load Quick Basic with the /L option and DS40 after it
  890.                    For example:
  891.                         QB /L DS40 /CMDTESTDOOR.CFG LOCAL
  892.  
  893.                 3) Load Quick Basic with the /CMD option and your configuration
  894.                    file's name after it with the word LOCAL.
  895.                    (See above example)
  896.  
  897.            If you forgot to load with the /CMD option, you can set it from
  898.         inside Quick Basic from the Run menu (Modify COMMAND$).
  899.            Now all you have to do is press F5 to run your program. If you
  900.         have any problems, refer to Appendix C - Common Questions.
  901.  
  902.   Door Source 4.0
  903.   Programmer's Manual - Page 23
  904.  
  905.         Finishing your Door
  906.         -------------------
  907.            To eliminate all possible problems, you should first thoroughly test
  908.         you door in two manners, logically, and unlogically. When you are
  909.         logically testing it, you should use your door the way you designed
  910.         it to be used, noting the little problems as you go. Then when you
  911.         unlogically test it, you try testing your program in a way completely
  912.         opposite of how you designed it. This method is a through method to
  913.         debug your program. You will find most of the errors through this
  914.         method, but then there are always situations that even you didn't
  915.         think of in either of these manners.
  916.            To finish a door you will need to compile to door into a EXE format.
  917.         This way you can use the door without having to load QuickBasic to run
  918.         your doors. Since Door Source doesn't use Quick Basic's communications
  919.         routines, you CAN compile your door to be a stand-alone program, that
  920.         doesn't need BRUN45.EXE. If you prefer to not make it a stand-alone,
  921.         you do not have to use a patched version of BRUN45.EXE like other
  922.         door packages require.
  923.            In order to compile your program, you must go to the Run menu and
  924.         select Make EXE. It will compile your program in memory and then
  925.         a window will pop up asking what you want the final file name of the
  926.         program to be, and other options. Do not select the produce debug
  927.         code option, it will only make your program larger and slower, and
  928.         allow people to break it in the middle by pressing CTRL-Break. After
  929.         you have everything like you want it, select one of the button on the
  930.         bottom of the window to start the process.
  931.            Of course, you'll need to provide some documentation for your
  932.         door, and good documentation should have some of these sections listed
  933.         here:
  934.                 Table of contents
  935.                 Disclaimer
  936.                 Overview/Summary of the door
  937.                 List of files in archive
  938.                 Configuration file setup
  939.                 Command line options
  940.                 Batch file setup
  941.                 Customization instructions
  942.                 List of function/ALT keys
  943.                 Possible errors/Troubleshooting
  944.  
  945.            A good disclaimer is always something that is hard to come by, here
  946.         is a disclaimer that pretty much covers you:
  947.  
  948.                 This program and other files associated with it are not
  949.                 guaranteed to be bug free or virus free. We are not
  950.                 responsible for any damages of any kind, including
  951.                 profit loses and data loss, that relate directly or
  952.                 indirectly to these programs and files. You may
  953.                 distribute this program, as long as it is in unmodified
  954.                 form with all the files originally included.
  955.   Door Source 4.0
  956.   Programmer's Manual - Page 24
  957.  
  958.            You may wish to add/change/delete something from this one, but it
  959.         is a pretty good one. A overview or summary of the door would be a
  960.         simple explanation of exactly what your door does, no specifics
  961.         really. The configuration file section should show a sample
  962.         configuration file, and give a sentence or two on each line in the
  963.         file. The command line options should show the user how to
  964.         configure the door to run with his system. Refer to the chapter
  965.         on command line options to put into your documentation.
  966.            The batch file setup should show a few example batch files, and
  967.         telling you if you need to add it in your daily event, etc,...
  968.         The customization section should tell the sysop that uses your door
  969.         how to better customize it to what he needs. Some examples might be
  970.         aliases allowed/not allowed, location of files, prompts, etc,...
  971.            The list of function keys is basically this:
  972.  
  973.                   F3  - Printer toggle
  974.                   F4  - Page bell toggle
  975.                   F5  - Shell to DOS
  976.                   F7  - Caller alarm toggle
  977.                   F8  - Return caller to board
  978.                   F10 - Start sysop chat
  979.                   ESC - Enter sysop chat
  980.                 ALT-X - Drop to DOS after caller logs off
  981.                 ALT-N - Sysop next on flag
  982.  
  983.            Troubleshooting should list a few possible errors that might
  984.         occur, and how to solve them. Like if error number 53 (File not found)
  985.         occurs, then search your configuration file for a misspelled filename
  986.         or a wrong path. If error 61 (Disk full) occurs, free up disk space.
  987.         Some errors can't be solved, and you could list those and have them
  988.         call a bulletin board for more help.
  989.  
  990.   Door Source 4.0
  991.   Programmer's Manual - Page 25
  992.  
  993.         Getting more out of Door Source
  994.         -------------------------------
  995.  
  996.         This section and the following section, Advanced Techniques, are
  997.         very closely related. With Door Source 4.0, it is basically possible
  998.         for you to write your own input and output routines using out base
  999.         routines to do the dirty work. The difference in between this section
  1000.         and the next is simply that this tells you how to take advantage of
  1001.         some of the new variables and features, and the next section tells
  1002.         you more on programming more advanced things with Door Source.
  1003.  
  1004.         The definable page sound
  1005.         ------------------------
  1006.  
  1007.            You can easily change the sound of the SysopPage routine by
  1008.         setting 3 variables - PageSound.1, PageSound.2, and PageSound.3
  1009.         The sound generated is in the order of PageSound.1, then PageSound.2,
  1010.         and then the final sound is PageSound.3. The numbers you put in
  1011.         PageSound should be in the acceptable range of the SOUND command,
  1012.         which is somewhere around 45-32767. A page sound of 200, 400, 600
  1013.         would make a sound that starts out low, then the next sound is
  1014.         about double the pitch of the first, and the third is double the
  1015.         pitch of the second. Its possible to create a variety of different
  1016.         sounds with this, try experimenting with the SOUND command first to
  1017.         find what you like the best. The duration of the sounds is set, and
  1018.         can't be changed.
  1019.                 Example:
  1020.                 PageSound.1=200
  1021.                 PageSound.2=400
  1022.                 PageSound.3=600
  1023.                 CALL SysopPage(Answered)
  1024.  
  1025.         Filtering your input
  1026.         --------------------
  1027.  
  1028.            Sometimes, you may want to limit the input to a question to a
  1029.         few letters, or selectively not recognize certain characters. To
  1030.         do so, you should set the Table$ variable. An example would be:
  1031.                 Example:
  1032.                 Table$ = "YNyn"
  1033.                 CALL Incomm("You can only type Y and N:",No,1,15)
  1034.                 ' Anything else besides Y,N,y,n that the user types is
  1035.                 ' not displayed or recognized. Backspace and enter CAN NOT
  1036.                 ' be filtered out.
  1037.                 Table$ = Default.Table$
  1038.                 ' This is necessary to reset the filter back to normal,
  1039.                 ' if you didn't do this then you'll have problems with
  1040.                 ' later Incomm commands still being restricted with the
  1041.                 ' filtering.
  1042.                 Output:
  1043.                 You can only type Y and N:Y   Door Source 4.0
  1044.   Programmer's Manual - Page 26
  1045.  
  1046.         Protecting input from prying eyes
  1047.         ---------------------------------
  1048.  
  1049.            When a password or something secret needs to be concealed, you
  1050.         can now set a "substitution character" that will be displayed in
  1051.         place of what the user really types. You can make the character
  1052.         anything you wish, but making it a null turns it off.
  1053.                 Example:
  1054.                 Protected.Input$="*" ' Now shows a * in place of text
  1055.                 CALL Incomm("Password:", No, No, 15)
  1056.                 Protected.Input$=""  ' Turns it off - Back to normal display
  1057.                 Output:
  1058.                 Password:******
  1059.  
  1060.         Two fancier input prompts
  1061.         -------------------------
  1062.  
  1063.            EntryIncomm
  1064.            -----------
  1065.            EntryIncomm prints out a field of (----) above the area where
  1066.            the user's input will be displayed. The size of the field is based
  1067.            on how big you make the field. Good for ANSI and NON-ANSI!
  1068.                 Example:
  1069.                 CALL EntryIncomm("Your new name:", 25, LightGreen, Yellow)
  1070.                 '                                  ^ Field size
  1071.                 Output:
  1072.                              (-------------------------)
  1073.                 Your new name:Zantigahicatal
  1074.  
  1075.            PromptIncomm
  1076.            ------------
  1077.            PromptIncomm is most useful in ANSI cases, but will handle
  1078.            non-ansi well too, but the purpose of the routine is defeated
  1079.            then. What it does is create a field similar to the EntryIncomm
  1080.            but the field is on the same line as the input. The second text
  1081.            field is the "default field" tells the user what it defaults to
  1082.            if they press enter, but its up to you to interpret them pressing
  1083.            enter. You can pass a string as the second parameter, and it
  1084.            will use that instead of one of the already programmed constants.
  1085.            The constants are:
  1086.                 Default1 = (Enter=no)
  1087.                 Default2 = (Enter=none)
  1088.                 Default3 = (Enter=quits)
  1089.  
  1090.                 Example:
  1091.                 CALL PromptIncomm("Do you wish to quit",Default1,
  1092.                         LightGreen, 1, Yellow)
  1093.                 '                   ^ Field size
  1094.                 Output:
  1095.                 Do you wish to quit (Enter=no) ? (N)   Door Source 4.0
  1096.   Programmer's Manual - Page 27
  1097.  
  1098.            Unabortable ViewFiles
  1099.            ---------------------
  1100.            Do you want to force the user to see out an entire file? Its easy
  1101.            to block the abort codes by setting the variable No.Abort to YES,
  1102.            then when the user tries to abort, it won't let him. However, if
  1103.            more prompts are still offered, answering NO to it will stop the
  1104.            display.
  1105.                 Example:
  1106.                 No.Abort = YES
  1107.                 CALL ViewFile("MYFILE.ANS", No, No, No)
  1108.                 No.Abort = NO   ' Reset it back to normal
  1109.  
  1110.            Disabling carrier checking
  1111.            --------------------------
  1112.            How would you like to turn off carrier checking for a
  1113.            call back verification program of some sort, or something
  1114.            along those lines? Try setting Carrier.Check to YES, and
  1115.            Door Source will *IGNORE* the carrier detect flag. If the
  1116.            user drops carrier, you'll have to handle and detect yourself!
  1117.                 Example:
  1118.                 Carrier.Check = No  ' Disables carrier checking
  1119.                 Carrier.Check = Yes ' (Default) enables carrier checking
  1120.  
  1121.            Checking the baud and the carrier, setting DTR, CTS, and RTS
  1122.            ------------------------------------------------------------
  1123.  
  1124.               Checking the baud rate
  1125.               ----------------------
  1126.               The variable Baud& has the baud rate stored in it. Here's
  1127.               what the number in it means:
  1128.                         1       - Local mode
  1129.                         300     - 300 baud
  1130.                         1200    - 1200 baud
  1131.                         2400    - 2400 baud
  1132.                         4800    - 4800 baud
  1133.                         9600    - 9600 baud
  1134.                         19200   - 19,200 baud
  1135.                         38400   - 38,400 baud
  1136.                         115200  - 115,200 baud
  1137.  
  1138.               Checking the carrier
  1139.               --------------------
  1140.               The routine CheckCarrier will tell you if a carrier is
  1141.               present.
  1142.                 Example:
  1143.                 CALL CheckCarrier(CarrierFlag)
  1144.                 IF CarrierFlag = NO AND Baud& > 1 THEN
  1145.                    CALL ExitDoor  ' Carrier lost!
  1146.                 END IF
  1147.  
  1148.   Door Source 4.0
  1149.   Programmer's Manual - Page 28
  1150.  
  1151.               Setting the DTR, CTS, and RTS
  1152.               -----------------------------
  1153.  
  1154.                 DTR
  1155.                 ---
  1156.                 The DTR (Data Terminal Ready) when on normally means that
  1157.                 you are on-line, and have a connection. However, on most
  1158.                 modems, turning it off while it is on will break the
  1159.                 connection.
  1160.                         Example:
  1161.                         CALL ChangeDTR(YES)   ' Turn DTR on
  1162.                         CALL ChangeDTR(NO)    ' Turn DTR off
  1163.  
  1164.                 CTS Control On/Off
  1165.                 ------------------
  1166.                 CTS (Clear To Send) is used to signal the other modem that
  1167.                 it is ok to send characters. Modems that don't preform
  1168.                 error checking or UARTS that don't have buffers may require
  1169.                 CTS flow-control to be on during high-speed file transfers.
  1170.                         Example:
  1171.                         CALL ChangeCTS(YES)   ' Turn CTS control on
  1172.                         CALL ChangeCTS(NO)    ' Turn CTS control off
  1173.  
  1174.                 RTS
  1175.                 ---
  1176.                 RTS (Request To Send) is used by most auto-dial modems to
  1177.                 see if a computer is ready to receive data from the modem.
  1178.                 If the RTS signal isn't detected, some modems may refuse
  1179.                 to accept modem commands or send result codes.
  1180.                         Example:
  1181.                         CALL ChangeRTS(YES)   ' Turn RTS on
  1182.                         CALL ChangeRTS(NO)    ' Turn RTS off
  1183.  
  1184.            Automatic more prompts
  1185.            ----------------------
  1186.            If you're displaying lots of information, like programmed in
  1187.            documentation, and you don't want to keep track of when you
  1188.            need to show a more prompt or a press any key prompt, just
  1189.            simply set the AutoMore variable to one of the settings:
  1190.                 0                              Disables the prompts (default)
  1191.                 MorePrompt    (Or the value 1) Causes automatic more prompts
  1192.                 PressKeyPromp (Or the value 2) Causes automatic press any key
  1193.                 Example:
  1194.                     AutoMore = MorePrompt
  1195.            The variable Lines.Since will tell you how many lines have been
  1196.            sent SINCE the last ClrScrn WITH one of the Send routines or
  1197.            Incomm routines. The automatic prompts are by default not
  1198.            enabled, and when enabled, they occur every 23 lines.
  1199.  
  1200.   Door Source 4.0
  1201.   Programmer's Manual - Page 29
  1202.  
  1203.         Advanced Techniques
  1204.         -------------------
  1205.            Door Source has several new features that are more program
  1206.         related, that are just a little bit to hard to put in the previous
  1207.         section, Getting more out of Door Source.
  1208.  
  1209.            The extra line status line
  1210.            --------------------------
  1211.            Normally, Door Source has lines 24 and 25 in use with its status
  1212.            line, but if you have some information of you're own that you'd
  1213.            like to put on it, now you can by using the GameInfoUpdate
  1214.            routine with the variable GameInfoCol.
  1215.            The only major change you have to make to your program is to use
  1216.            the DSGAME.INT file instead of the DOORSORC.INT file, and you'll
  1217.            need to write a routine to do the status line updating.
  1218.            First of all, the Door Source status line is moved up to lines
  1219.            23 and 24, and we leave 25 for your use. You call the
  1220.            GameInfoUpdate routine like you would call print, for example:
  1221.                 ' $INCLUDE:'DSGAME.INT'
  1222.                   .
  1223.                   .  (Later in the program)                         Background
  1224.                   .                                                     \/
  1225.                 CALL GameInfoUpdate("This is on the 25th line!", No, 14, 7)
  1226.                                      ^ Text                      ^   ^
  1227.                                                                  |   Foreground
  1228.                                                                  Enter
  1229.            The background is the last number, and the color you specify is
  1230.            the foreground color. The enter parameter is like the ; on a
  1231.            print command, telling it no keeps the current position at that
  1232.            spot, but yes will start at column 1 when you do the next
  1233.            GameInfoUpdate.
  1234.            But what if you want to position the cursor somewhere on the
  1235.            line without printing to that location? Or what if you want
  1236.            to know where the cursor is? You can tell both of these by
  1237.            looking at the GameInfoCol variable. For example:
  1238.                 A = GameInfoCol   ' A now contains the horizontal position
  1239.                                   ' of the cursor on line 25.
  1240.                 GameInfoCol = 30  ' With the next GameInfoUpdate call, it
  1241.                                   ' will start printing at column 30.
  1242.            Now the only thing missing is your interfacing this into your
  1243.            program. The easiest way to do this is to write a new ClrScrn
  1244.            routine, that you call in place of ClrScrn, this is necessary
  1245.            because ClrScrn doesn't update your line when called, so you'll
  1246.            have to do it. Here's an example of a new ClrScrn:
  1247.               SUB ClearTheScreen
  1248.                  CALL ClrScrn
  1249.                  CALL GameInfoUpdate("This is on the 25th line!",No,14,7)
  1250.               END SUB
  1251.  
  1252.   Door Source 4.0
  1253.   Programmer's Manual - Page 30
  1254.  
  1255.            Writing your own output routines
  1256.            --------------------------------
  1257.               With Door Source, you can virtually write your own output
  1258.            routines for use with your program. The kernel for all of our
  1259.            output routines is the Send1Line routine. It will send one
  1260.            line out to the local and remote display, and will decode the
  1261.            substitution codes too! All that's left for you to do is to
  1262.            write your own routine that calls this routine. For example,
  1263.            say you wanted to write a routine that would colorize all of the
  1264.            letters that are the capital A, then you might do this:
  1265.               SUB ColorizeTheA(Text$,AColor$,RegularColor$)
  1266.                  FOR X=1 TO LEN(Text$)
  1267.                     IF MID$(Text$,X,1)="A" THEN
  1268.                        CALL Send1Line(AColor$+MID$(Text$,X,1))
  1269.                     ELSE
  1270.                        CALL Send1Line(RegularColor$+MID$(Text$,X,1))
  1271.                     END IF
  1272.                  NEXT X
  1273.               END SUB
  1274.            The variables AColor$ and RegularColor$ would store the @X color
  1275.            codes for the colors for A's and other letters.
  1276.  
  1277.            Writing your own input routines
  1278.            -------------------------------
  1279.               You can write your own input routines too with Door Source.
  1280.            The main kernel for the input routine is CommInkey$, and a few
  1281.            other routines supplement the features offered in Incomm. An
  1282.            example input routine that is very simple might be:
  1283.               SUB GetInput
  1284.                  DO
  1285.                     A$=CommInkey$
  1286.                     IF A$="" THEN A$=INKEY$
  1287.                  LOOP UNTIL A$<>""
  1288.                  ARG$=A$
  1289.               END SUB
  1290.            You should also be aware that all filters, and special variables
  1291.            that affect input with Incomm do NOT work with CommInkey$, you
  1292.            have to program in support for them yourself if you want them.
  1293.            The GetInput routine above would wait for a key to be pressed
  1294.            on the local or remote keyboard. Now say that you want to echo
  1295.            the character to the screen and to the remote screen, you'd do
  1296.            this:
  1297.               SUB GetInput
  1298.                  DO
  1299.                     A$=CommInkey$
  1300.                     IF A$="" THEN A$=INKEY$
  1301.                  LOOP UNTIL A$<>""
  1302.                  ARG$=A$
  1303.                  CALL Send1Line(A$)   ' Echos the character
  1304.               END SUB
  1305.   Door Source 4.0
  1306.   Programmer's Manual - Page 31
  1307.  
  1308.            Now maybe you want to trap the function keys, you could do this:
  1309.               SUB GetInput
  1310.                  DO
  1311.                     A$=CommInkey$
  1312.                     IF A$="" THEN A$=INKEY$
  1313.                  LOOP UNTIL A$<>""
  1314.                  ARG$=A$
  1315.                  IF LEFT$(A$,1)=CHR$(0) THEN
  1316.                     CALL ExtendedCode(A$,NULL) ' Process the function key
  1317.                  ELSE
  1318.                     CALL Send1Line(A$)         ' Echos the character
  1319.                  END IF
  1320.               END SUB
  1321.            The NULL variable on the ExtendedCode is used only by Incomm,
  1322.            and you shouldn't pass anything to it in place of it, and its
  1323.            not used to return anything to your program. Now the GetInput
  1324.            routine we have above is pretty good. It will accept input
  1325.            from the keyboard and from remote, check for a extended code
  1326.            and process it, otherwise it will echo the character.
  1327.            You can also write your own chat routine, but use our code
  1328.            by calling Incomm with the second parameter as a 5. This
  1329.            will print the "Sysop started chat at" and the "Hello, this is"
  1330.            lines, and then will handle the input and color for you, then
  1331.            once the sysop presses ESC to end the chat, it will print the
  1332.            "Sysop ended chat at" and return control to you. So basically, by
  1333.            passing a 5 as the second parameter forces a chat.
  1334.               Example:
  1335.               CALL Incomm("",5,No,15)   ' Forces a chat
  1336.  
  1337.            Carrier loss processing
  1338.            ----------------------
  1339.               Sometimes in more complex doors, its necessary to process
  1340.            a carrier drop yourself in order to save and wrap up files.
  1341.            You could turn carrier checking off, but its best if you use
  1342.            the CarrierLossError method. What you do is set CarrierLossError
  1343.            to YES and when carrier is dropped, a error number 255 will be
  1344.            forced, and if you have a ON ERROR trapping processing in your
  1345.            program, you will be able to catch it, and then let Door Source
  1346.            finish off the rest. For an example, please refer to the example
  1347.            program ERRDEMO.BAS.
  1348.  
  1349.   Door Source 4.0
  1350.   Programmer's Manual - Page 32
  1351.  
  1352.         How a door works
  1353.         ----------------
  1354.            Understanding how a door works is good to know so that you can
  1355.         better plan your door. Here's a simple diagram on what happens:
  1356.  
  1357.                         BBS Creates the interface file and exits
  1358.                                          \|/
  1359.                                 Door's batch file is run
  1360.                                          \|/
  1361.              |-->      Door loads and reads in the interface file
  1362.              |                           \|/
  1363. Door Source  |      The door opens the communications port if needed
  1364. handles this |                           \|/
  1365. with your    |                 User interacts with the door
  1366. program      |                           \|/
  1367.              |-->  Door eventually exits, updating the interface file
  1368.                                          \|/
  1369.                        BBS reloads and reads in the interface file
  1370.                                          \|/
  1371.                               User continues using the bbs
  1372.  
  1373.         The DOORSORC.INT file sets up the necessary DECLAREs for the routines
  1374.         and the functions, it then sets up the COMMON SHARED block which lets
  1375.         you share variables with Door Source, like Baud&. Then it sets up
  1376.         a few constants, and then calls InitDoor, then the Door Source library
  1377.         takes over, and reads the configuration file, initialize its variables
  1378.         and then opens the com port for access. Then control is returned to
  1379.         you and your program picks up from their setting the program's name
  1380.         and version, etc,... While you're doing other processing, Door Source
  1381.         is ALWAYS looking at the com port, keeping received data in its
  1382.         buffer until you're ready for it. Door Source monitors everything
  1383.         for you, from carrier detection to characters being sent to
  1384.         characters being received, all behind the scenes.
  1385.  
  1386.   Door Source 4.0
  1387.   Programmer's Manual - Page 33
  1388.  
  1389.         Converting from Door Source 3.2 or before to 4.0
  1390.         ------------------------------------------------
  1391.            There are a few changes in how you call routines from 3.2 and
  1392.         before. Here's the list and how to change your program to fit 4.0
  1393.         without major restructuring. The easiest way to change things is
  1394.         using the QuickBasic search and replace feature from the edit menu.
  1395.  
  1396.          * Routine AllTrun is now a function, you use it like this:
  1397.                 A$ = AllTrun$(A$)
  1398.          * Routine HighScores has a extra parameter. The new third parameter
  1399.            lets you output its output to a already open file by passing the
  1400.            file number, but if you pass a 0, it outputs to the screen.
  1401.                 CALL HighScores(Score, ScoreDataFile$, OutputFileNumber)
  1402.          * Routine Windows has a few parameters changes, the text foreground
  1403.            and text background have been deleted since WindowPrint and
  1404.            WindowInput do all window processing. Windows in your program
  1405.            will need to be re-written because of this.
  1406.                 CALL Windows(ULR, ULC, LRR, LRC, Foreground, Background,
  1407.                         Border, Shadow)
  1408.          * Routine Windows has two new borders, they are:
  1409.                 3 - Double horizontal Single vertical
  1410.                 4 - Single horizontal Double vertical
  1411.  
  1412.          * Routine DayOfWeek moved into ScriptCMD.
  1413.                 I1$="DAYOFWEEK":CALL ScriptCMD
  1414.          * Routine MenuManager parameters have been changed, the Select$
  1415.            parameter has been deleted, since now ANSI.Select$ and
  1416.            NonANSI.Select$ (COMMON SHARED variables) are now used for the
  1417.            select string. BarForeground and BarBack have been added, they
  1418.            have the foreground and background color for the selection bar.
  1419.                 CALL MenuManager(Menu$(),Center,TextColor,NumberOfSelections,
  1420.                    BarForeground, BarBackground, BarnumberSelected)
  1421.          * Routine SysopPage now has an extra parameter, this extra one is
  1422.            used to return a variable in, not to pass one. It returns a 1 (YES)
  1423.            if the page was answered.
  1424.                 CALL SysopPage(Answered)
  1425.          * Routine ErrorLevelSet has been removed because of environment
  1426.            conflicts.
  1427.  
  1428.   Door Source 4.0
  1429.   Programmer's Manual - Page 34
  1430.  
  1431.         Summary of new features
  1432.         -----------------------
  1433.                 LOCAL command line switch added
  1434.                 NETWORK command line switch added
  1435.                 Up.Key$ and Down.Key$ variables added
  1436.                 SysopPage changed
  1437.                 PageSound.1, PageSound.2, and PageSound.3 added
  1438.                 Page.String$ added
  1439.                 F5 (Shell to DOS) added
  1440.                 F3 (Printer toggle) added
  1441.                 GameInfoUpdate routine added
  1442.                 GameInfoCol added
  1443.                 Table$ and Default.Table$ added
  1444.                 PromptIncomm routine added
  1445.                 No.Abort added
  1446.                 MenuManager changed
  1447.                 Parser changed
  1448.                 WindowPrint and WindowInput routines added
  1449.                 ExtendedCode routine added
  1450.                 Protected.Input$ added
  1451.                 BlockSend routine added
  1452.                 RainbowSend routine added
  1453.                 Windows routine changed
  1454.                 DayOfWeek routine moved into ScriptCMD
  1455.                 RandNum function fixed
  1456.                 EntryIncomm added
  1457.                 AllTrun routine changed into a function
  1458.                 CheckCarrier routine added
  1459.                 Baud& variable added
  1460.                 CarrierLossError added
  1461.                 Carrier.Check added
  1462.                 ChangeDTR, ChangeCTS, and ChangeRTS added
  1463.                 IRQ command line parameter added
  1464.                 ADDR command line parameter added
  1465.                 PS2 command line parameter added
  1466.                 HighScores changed
  1467.                 ALL ROUTINES optimized to run faster, and to be more compact
  1468.  
  1469.   Door Source 4.0
  1470.   Programmer's Manual - Page 35
  1471.  
  1472.         Appendix A - CALL Syntax
  1473.         ------------------------
  1474.  
  1475.         CALL QSend(Text$, Enter)
  1476.         CALL BackSpace(Text$)
  1477.         CALL ExtendedCode(Text$,NULL)
  1478.         CALL BeepSpeaker()
  1479.         CALL NL(Number.Of.Lines)
  1480.         CALL Send(Text$, Bell, Enter, Color.To.Use)
  1481.         CALL Incomm(Text$, Enter, Limit.Field, Color.To.Use)
  1482.         CALL ANSIMusic(Music$, Music)
  1483.         CALL GameInfoUpdate(Text$, Enter, Color.To.Use, Color.Background)
  1484.         CALL BackSpaceOver()
  1485.         CALL Center(Text$)
  1486.         CALL ClrScrn
  1487.         CALL ColorEasy(Text$, Color.To.Use, Enter)
  1488.         CALL DoorBusy()
  1489.         CALL ErrorLevelSet(Error.Level)
  1490.         CALL ExitDoor()
  1491.         CALL GetTime(Hours, Minutes, Seconds, SinceMid#)
  1492.         CALL HighScores(Score, Score.FileName$, OutputFileNumber)
  1493.         CALL MenuManager(Menu$(), Center, TextColor, Number.Of.Bars,
  1494.            Select.Color, BarForeground, BarBackground, BarSelected)
  1495.         CALL MoveCursor(X,Y)
  1496.         CALL Parser(SearchFor$, SearchIn$, Array$(), ErrCode)
  1497.         CALL ReadUsers(ErrCode)
  1498.         CALL ScriptCMD()
  1499.         CALL Sorter(Array$(), How.Many.Elements)
  1500.         CALL SysopPage(Answered)
  1501.         CALL TimeConvert(Hours, Minutes, New.Time$)
  1502.         CALL ViewFile(FileName$, Check.For.GFile, MorePrompts, EnterPrompt)
  1503.         CALL WaitASec(How.Many.Seconds.To.Wait)
  1504.         CALL Windows(ULR, ULC, LRR, LRC, Fore, Back, Border, Shadow)
  1505.         CALL WriteUsers(ErrCode)
  1506.         CALL BlockSend(Array$(), Center, Lines.To.Send)
  1507.         CALL WindowPrint(Text$, Row, Col, Fore, Back)
  1508.         CALL WindowInput(Text$, MaxLength, Row, Col, Fore, Back)
  1509.         CALL RainbowSend(Text$, Bell, Enter, Color.To.Use)
  1510.         CALL PromptIncomm(Text$, Default$, DefaultColor, LimitField,
  1511.            Color.To.Use)
  1512.         CALL EntryIncomm(Text$, LimitField, FieldColor, Color.To.Use)
  1513.         CALL ShellToDos(Shell.String$)
  1514.  
  1515.   Door Source 4.0
  1516.   Programmer's Manual - Page 36
  1517.  
  1518.         Appendix B - Optimizing your door
  1519.         ---------------------------------
  1520.            The best way to optimize a door program can be divided into two
  1521.         parts.
  1522.                 1) The first part is cleaning up your code. This would mean
  1523.                    elimination of most or all GOTOs and GOSUBs, elimination
  1524.                    of as many constants as possible, and elimination of
  1525.                    repetition in your code.
  1526.                 2) The second part is compiling from the command line.
  1527.                    QuickBasic compiles with some unneeded options when you
  1528.                    select the Make EXE command from the Run menu. You might
  1529.                    need the error trapping flag (/X) if you have a ON ERROR
  1530.                    statement in your program, and you might need the switch
  1531.                    for dynamic arrays (/AH) if you're using them. Here's a
  1532.                    sample compilation for a NON-STANDALONE program:
  1533.                       BC MYPROG;
  1534.                       LINK /EX MYPROG.BAS,MYPROG.EXE,,BRUN45.LIB+DOORSORC.LIB
  1535.  
  1536.                    For a STANDALONE program, use this:
  1537.                       BC MYPROG/O;
  1538.                       LINK /EX MYPROG.BAS,MYPROG.EXE,,BCOM45.LIB+DOORSORC.LIB
  1539.  
  1540.                    These parameters will compile the to the most compact
  1541.                    format. You can also use PKLITE to compress it more.
  1542.  
  1543.   Door Source 4.0
  1544.   Programmer's Manual - Page 37
  1545.  
  1546.         Appendix C - Common Questions
  1547.         -----------------------------
  1548.         Q: How do I read in additional information from the configuration
  1549.            file?
  1550.         A: To read in more information, simply INPUT from file #1 after you
  1551.            call ClrScrn for the first time. Make sure to close it when you're
  1552.            done. Here's an example:
  1553.               ' $INCLUDE:'DOORSORC.INT'
  1554.               PROGNAME$="Example"
  1555.               RELEASE$="1.0"
  1556.               CALL ClrScrn
  1557.               INPUT #1, ExtraInfo
  1558.               CLOSE #1
  1559.            Door Source doesn't read past the fourth line of the configuration
  1560.            file, so you can put whatever you please there.
  1561.         Q: How do I test a door from inside QuickBasic?
  1562.         A: You must have first loaded QuickBasic with the /L option specifying
  1563.            the Door Source library. For example:
  1564.               QB MYDOOR /L DOORSORC
  1565.            Then you will need to setup the command line parameters by setting
  1566.            the COMMAND$, you do this from the Run menu from Modify COMMAND$.
  1567.            Now, as long as your configuration file, bbs interface file, and
  1568.            all other files you need exist, you can press F5 and test your door
  1569.            from QuickBasic.
  1570.         Q: Should I compile as a stand-alone door?
  1571.         A: It's up to you. A stand-alone door will not need the BRUN45.EXE,
  1572.            but it will make your door significantly larger, and compiling
  1573.            not as a stand-alone will save space. Door Source will work fine
  1574.            either way.
  1575.         Q: What does the error "Error opening port -1" mean?
  1576.         A: It means that you have specified a invalid serial port, and you
  1577.            should check your bbs interface file or your bbs's setup.
  1578.  
  1579.   Door Source 4.0
  1580.   Programmer's Manual - Page 38
  1581.  
  1582.         Appendix D - Variable Reference
  1583.         -------------------------------
  1584.         The first part of this reference is of the global variables, the
  1585.         second is of the global UserBlock type declaration.
  1586.  
  1587.         Variable Name   Purpose
  1588.         -------------   ------------------------------------------------------
  1589.         ARG$            Input from user, returned by Incomm routine
  1590.         SYSDPATH$       Drive/Path/Filename of bbs interface file
  1591.         BBSName$        Name of BBS running on
  1592.         SysopNM$        Sysop FULL name
  1593.         CALLNAME$       Caller's FULL name
  1594.         Baud&           Baud rate of caller
  1595.         PROGNAME$       Name of your door
  1596.         RELEASE$        Version of your door
  1597.         ANSI            Ansi Flag  (1 = On  0 = Off)
  1598.         I1$,I2$,I3$     Input variables to script commands
  1599.         O1$,O2$,O3$     Output variables from script commands
  1600.         User.Color      Color that user input will be display in
  1601.         BackGroundColor Color to use for background when displaying
  1602.         Exit.Dor.1$     First line of ExitDoor message
  1603.         Exit.Dor.2$     Second line of ExitDoor message
  1604.         Exit.Dor.Clr1   Color of first line
  1605.         Exit.Dor.Clr2   Color of second line
  1606.         UserF$          First name of caller
  1607.         UserL$          Last name of caller
  1608.         Caps            Convert all input to caps (1 = Yes  0 = No)
  1609.         Page.Bell       Page bell toggle (-1 = On  0 = Off)
  1610.         Caller.Alarm    Caller alarm (-1 = On  0 = Off)
  1611.         Sysop.Next      Sysop next on toggle (-1 = On  0 = Off)
  1612.         Hang.Up         Exit to DOS after log off toggle (-1 = On  0 = Off)
  1613.         User.Record     Record number of user
  1614.         Network         Network active (1 = Yes  0 = No)
  1615.         Display.Toggle  Display on/off toggle (ignored by DS -1 = On  0 = Off)
  1616.         Printer.Toggle  Printer on/off (-1 = On  0 = Off)
  1617.         BusyFlag        A signal to ExitDoor that DoorBusy routine is in use
  1618.         UserFile$       Drive/Path/Filename of USERS file (PCBoard ONLY!)
  1619.         Up.Key$         Key to be used for scrolling up in MenuManager
  1620.         Down.Key$       Key to be used for scrolling down in MenuManager
  1621.         Parity          Parity of user calling (7 or 8 data bits)
  1622.         Filter          Incomm filtering active (filters all high ascii out)
  1623.         BusyFile$       Drive/Path/Filename of busy file for DoorBusy routine
  1624.         SysFirst$       Sysop's first name
  1625.         SysLast$        Sysop's last name
  1626.         CommPort        Communacations port being used (1-8)
  1627.         Last.Clr.Used   Last color used in a call to Send
  1628.         EchoKey         STOPS echoing keys to remote user (1 = Yes  0 = No)
  1629.         No.Enter.Send   Incomm doesn't send enter when done (1 = Yes  0 = No)
  1630.         File.Missing$   String ViewFile$ displays when file is not found
  1631.         BBSType$        Type of BBS in use (PCB14, PCB121, PCB122, WILDCAT,
  1632.                         RBBS, or DOORSYS)   Door Source 4.0
  1633.   Programmer's Manual - Page 39
  1634.  
  1635.         Node            Node caller is on
  1636.         TabSpace        Send will tab to this column before sending
  1637.         InverseText     Reverses the text colors (Foreground/Background switch)
  1638.         Sysop           Sysop is on (1 = Yes  0 = No)
  1639.         BlinkText       Send will make text blink
  1640.         Not.Around$     String to show when Sysop doesn't answer page
  1641.         PARAM$          Extra command-line parameters that DS didn't use
  1642.         Page.String$    String to display while paging
  1643.         PageSound.1     First tone of page
  1644.         PageSound.2     Second tone of page
  1645.         PageSound.3     Third tone of page
  1646.         GameInfoCol     Column to start printing on game status line
  1647.         Default.Table$  Table containing a unaltered filter
  1648.         Table$          Specific filtering of characters for Incomm
  1649.         KeyBoardTimeOut Number of SECONDS for a keyboard time out
  1650.         Protected.Input$  Incomm displays this instead of what user types
  1651.         ANSI.Select$    Menu Manager's ANSI selection string
  1652.         NonAnsi.Select$ Menu Manager's NON-ANSI selection string
  1653.         Carrier.Check   Disables carrier checking (1 = Yes  0 = No)
  1654.         CarrierLossError  Causes ExitDoor to generate a error 255 if carrier
  1655.                           is dropped.
  1656.         No.Abort        Disables CTRL-X, CTRL-K keys from aborting screens
  1657.                         (1 = Yes  0 = No)
  1658.         AutoMore        Automatically prints more prompts/press any key prompts
  1659.         Lines.Since     Number of lines printed since last more/press prompt
  1660.         
  1661.  
  1662.   Door Source 4.0
  1663.   Programmer's Manual - Page 40
  1664.  
  1665.         This is the reference for the UserBlock global variable
  1666.  
  1667.   Variable                Type          P  W  R  D   Description
  1668.  -------------------     -----------    -  -  -  -   -------------------------
  1669.  CityState            AS STRING * 24    Y  Y  Y  Y   City and state of user
  1670.  Password             AS STRING * 12    Y  Y     Y   User's Password
  1671.  BusinessPhone        AS STRING * 13    Y        Y   User's Business/Data phone
  1672.  VoicePhone           AS STRING * 13    Y  Y     Y   User's Voice/Home phone
  1673.  LastDateOn           AS STRING * 20    Y  Y     Y   Last date user was on
  1674.  LastTimeOn           AS STRING * 5     Y            Last time user was on
  1675.  ExpertMode           AS STRING * 1     Y  Y     Y   Expert mode "Y" or "N"
  1676.  ProtocolType         AS STRING * 5     Y  Y     Y   Protocol selected
  1677.  LastDirListing       AS STRING * 10    Y  Y         Last date viewed dir
  1678.  SecurityLevel        AS INTEGER        Y  Y  Y  Y   Security Level for user
  1679.  TimesOn              AS INTEGER        Y  Y     Y   Number of times on before
  1680.  PageLength           AS INTEGER        Y  Y         Page length for user
  1681.  TotalUploads         AS INTEGER        Y  Y     Y   Total # of uploads made
  1682.  TotalDownloads       AS INTEGER        Y  Y     Y   Total # of downloads made
  1683.  DailyDownloadBytes   AS DOUBLE         Y            # of download bytes left
  1684.  UserComment          AS STRING * 30    Y            User Comment field
  1685.  SysopComment         AS STRING * 30    Y            Sysop Comment field
  1686.  ElapsedTime          AS INTEGER        Y  Y         Elapsed Time on system  1
  1687.  Subscription         AS STRING * 20    Y
  1688.  SubscriptionExpire   AS STRING * 20    Y
  1689.  AreaRegistration     AS STRING * 50    Y  Y     Y   Areas user has access to
  1690.  AreaExpire           AS STRING * 50    Y
  1691.  AreasToScan          AS STRING * 50    Y
  1692.  TotalDownloadBytes   AS DOUBLE         Y  Y     Y   Total bytes downloaded
  1693.  TotalUploadBytes     AS DOUBLE         Y            Total bytes uploaded
  1694.  DeleteFlag           AS STRING * 1     Y            Flag to delete user
  1695.  TimeEnteredDoor      AS STRING * 5     Y  Y  Y  Y   Time user entered door
  1696.  AreaFrom             AS INTEGER        Y        Y   Area user exited from
  1697.  MemorizedMessage     AS LONG           Y            Memorized message #
  1698.  TimeCalled           AS STRING * 5     Y  Y         Time user called bbs
  1699.  DailyDownloadTotal   AS INTEGER           Y         Total downloads TODAY
  1700.  MaxDownloadLimit     AS DOUBLE            Y         Max downloads TODAY
  1701.  LastRead             AS INTEGER           Y         Message last read
  1702.  MaxDownloadKLimit    AS DOUBLE         Y  Y     Y   Max d/l K TODAY
  1703.  ExpirationDate       AS STRING * 10             Y
  1704.  LR0                  AS STRING * 4     Y
  1705.  LR1                  AS STRING * 4     Y
  1706.  LR2                  AS STRING * 4     Y
  1707.       .
  1708.       .
  1709.  LR39                 AS STRING * 4     Y
  1710.  
  1711.  
  1712.   Door Source 4.0
  1713.   Programmer's Manual - Page 41
  1714.  
  1715.         Appendix E - Script Commands Reference
  1716.         --------------------------------------
  1717.         Script commands are several small routines packed all into one.
  1718.         In order to access them, you set the according variables, and
  1719.         then make a call to ScriptCMD routine. For example, if you
  1720.         wanted to display a Press [ANY KEY] to continue prompt, you
  1721.         could do this:
  1722.                 I1$ = "PRES"
  1723.                 CALL ScriptCMD
  1724.         Variables I1$, I2$, and I3$ are all INPUT variables that store
  1725.         information for the routine to use. O1$, O2$, and O3$ are all OUTPUT
  1726.         variables that return information from the routine to you.
  1727.         I1$ is always the name of the routine you're calling inside of
  1728.         ScriptCMD. You only have to specify the first 4 letters of the
  1729.         word unless stated in the documentation.
  1730.  
  1731.  
  1732.   Door Source 4.0
  1733.   Programmer's Manual - Page 42
  1734.  
  1735.         LTRIM
  1736.  
  1737.         Purpose: To trim all leading spaces
  1738.  
  1739.         Name in ScriptCMD: LTRIM
  1740.  
  1741.         Remarks: This routine is a simple truncation routine to remove
  1742.         all leading spaces from a string.
  1743.  
  1744.         Parameters Passed:
  1745.                 I2$ - The string to be truncated
  1746.  
  1747.         Parameters Returned:
  1748.                 O1$ - The truncated string
  1749.  
  1750.  
  1751.   Door Source 4.0
  1752.   Programmer's Manual - Page 43
  1753.  
  1754.         RTRIM
  1755.  
  1756.         Purpose: To trim all trailing spaces
  1757.  
  1758.         Name in ScriptCMD: RTRIM
  1759.  
  1760.         Remarks: This routine is a simple routine to truncate all trailing
  1761.         spaces from a string.
  1762.  
  1763.         Parameters Passed:
  1764.                 I2$ - The string to be truncated
  1765.  
  1766.         Parameters Returned:
  1767.                 O1$ - The truncated string
  1768.  
  1769.  
  1770.   Door Source 4.0
  1771.   Programmer's Manual - Page 44
  1772.  
  1773.         Upper Case
  1774.  
  1775.         Purpose: To convert a string to all upper case
  1776.  
  1777.         Name in ScriptCMD: UPPER
  1778.  
  1779.         Remarks: This routine will convert a string into all upper case
  1780.  
  1781.         Parameters Passed:
  1782.                 I2$ - The string to be converted
  1783.  
  1784.         Parameters Returned:
  1785.                 O1$ - The converted string
  1786.  
  1787.  
  1788.   Door Source 4.0
  1789.   Programmer's Manual - Page 45
  1790.  
  1791.         Lower case
  1792.  
  1793.         Purpose: To convert a string to all lower case
  1794.  
  1795.         Name in ScriptCMD: LOWER
  1796.  
  1797.         Remarks: This routine will convert a string into all lower case
  1798.  
  1799.         Parameters Passed:
  1800.                 I2$ - The string to be converted
  1801.  
  1802.         Parameters Returned:
  1803.                 O1$ - The converted string
  1804.  
  1805.  
  1806.   Door Source 4.0
  1807.   Programmer's Manual - Page 46
  1808.  
  1809.         More Prompt
  1810.  
  1811.         Purpose: To display a more prompt
  1812.  
  1813.         Name in ScriptCMD: MORE
  1814.  
  1815.         Remarks: This will display a more prompt and allow the user to
  1816.         select Yes to continue, No to abort, and C to go non-stop. It
  1817.         will return a Y (for yes), a N (for no), or a C (for non-stop)
  1818.         in O1$
  1819.  
  1820.         Parameters Passed: None
  1821.  
  1822.         Parameters Returned:
  1823.                 O1$ - Contains a Y, N, or C
  1824.  
  1825.  
  1826.   Door Source 4.0
  1827.   Programmer's Manual - Page 47
  1828.  
  1829.         Press Any Key
  1830.  
  1831.         Purpose: To display a Press [ANY KEY] to continue prompt
  1832.  
  1833.         Name inside ScriptCMD: PRESS
  1834.  
  1835.         Remarks: This will display a Press [ANY KEY] to continue prompt and
  1836.         then wait for the key to be pressed:
  1837.  
  1838.         Parameters Passed: None
  1839.  
  1840.         Parameters Returned: None
  1841.  
  1842.  
  1843.   Door Source 4.0
  1844.   Programmer's Manual - Page 48
  1845.  
  1846.         Exist
  1847.  
  1848.         Purpose: To check if a file exists
  1849.  
  1850.         Name inside ScriptCMD: EXIST
  1851.  
  1852.         Remarks: This will check for the existence of the file specified.
  1853.  
  1854.         Parameters Passed:
  1855.                 I2$ - Drive/Path/Location of file to check for
  1856.  
  1857.         Parameters Returned:
  1858.                 O1$ - If the file exists
  1859.                       (Y = Yes  N = No)
  1860.  
  1861.  
  1862.   Door Source 4.0
  1863.   Programmer's Manual - Page 49
  1864.  
  1865.         Name conversion
  1866.  
  1867.         Purpose: To convert a name into proper upper and lower case
  1868.  
  1869.         Name inside ScriptCMD: NAMECASE
  1870.  
  1871.         Remarks: This will take a name like "DR. JOHN DOE" and properly
  1872.         convert it into "Dr John Doe"
  1873.  
  1874.         Parameters Passed:
  1875.                 I2$ - The name to be converted
  1876.  
  1877.         Parameters Returned:
  1878.                 O1$ - The converted name
  1879.  
  1880.  
  1881.   Door Source 4.0
  1882.   Programmer's Manual - Page 50
  1883.  
  1884.         Coding and Decoding
  1885.  
  1886.         Purpose: To code and decode a string
  1887.  
  1888.         Name inside ScriptCMD: CODER
  1889.  
  1890.         Remarks: This is a simple coding routine that will resist causal
  1891.         attempts to break it. It will code and decode with the same password.
  1892.         The longer the password, the better the protection you will have.
  1893.         The password shouldn't have any high ASCII characters in it.
  1894.  
  1895.         Parameters Passed:
  1896.                 I2$ - String to be coded/decode
  1897.  
  1898.                 I3$ - Password to code/decode with
  1899.  
  1900.         Parameters Returned:
  1901.                 O1$ - The coded/decoded string
  1902.  
  1903.  
  1904.   Door Source 4.0
  1905.   Programmer's Manual - Page 51
  1906.  
  1907.         Reverse Bits
  1908.  
  1909.         Purpose: To reverse the bits in a string
  1910.  
  1911.         Name inside ScriptCMD: REVERSEBITS (MUST USE ENTIRE NAME!)
  1912.  
  1913.         Remarks: This will take all of the characters in a string and reverse
  1914.         it's bits. This is a simple, but easy to break coding routine. To
  1915.         unreverse the bits, just call the routine again.
  1916.  
  1917.         Parameters Passed:
  1918.                 I2$ - The string to bit reverse
  1919.  
  1920.         Parameters Returned:
  1921.                 O1$ - The bit reversed string
  1922.  
  1923.  
  1924.   Door Source 4.0
  1925.   Programmer's Manual - Page 52
  1926.  
  1927.         Reverse Characters
  1928.  
  1929.         Purpose: To reverse the order of characters in a string
  1930.  
  1931.         Name inside ScriptCMD: REVERSECHARS (MUST USE ENTIRE NAME!)
  1932.  
  1933.         Remarks: This changes the order of characters in a string so that
  1934.         the first is last, and the last is first, and so on throughout the
  1935.         entire string. To decode it, simply call the routine again.
  1936.  
  1937.         Parameters Passed:
  1938.                 I2$ - The string to be reversed
  1939.  
  1940.         Parameters Returned:
  1941.                 O1$ - The reversed string
  1942.  
  1943.  
  1944.   Door Source 4.0
  1945.   Programmer's Manual - Page 53
  1946.  
  1947.         Appendix F - Command Reference
  1948.         ------------------------------
  1949.  
  1950.         Each command is shown in a set format. The format is as follows:
  1951.  
  1952.         Name of routine
  1953.  
  1954.         Purpose: States the prupose of the routine
  1955.  
  1956.         Remarks: Tells you the general information on the routine and how
  1957.         to use it.
  1958.  
  1959.         Parameters Passed: Tells you what parameters to the routine and what
  1960.             they are for.
  1961.  
  1962.         Parameters Returned: Tells you what parameters are returned and what
  1963.             is in them.
  1964.  
  1965.         Example: A short little program showing the usage of the routine
  1966.  
  1967.         See Also: (on some routines) Gives you a reference to other routines
  1968.             that do nearly the same thing or that work with this routine.
  1969.   Door Source 4.0
  1970.   Programmer's Manual - Page 54
  1971.  
  1972.         AdjustTimeLimit
  1973.  
  1974.         Purpose: To adjust the user's time remaining
  1975.  
  1976.         Syntax: CALL AdjustTimeLimit(Minutes)
  1977.  
  1978.         Remarks: This will adjust the user's time remaining up or down
  1979.         depending on the number you pass it.
  1980.  
  1981.         Parameters Passed:
  1982.                 Minutes - The number of minutes to increase the user's time
  1983.  
  1984.         Parameters Returned: None
  1985.  
  1986.         Example:
  1987.                 CALL AdjustTimeLimit(10)     ' Give 10 minutes
  1988.                 CALL AdjustTimeLimit(-10)    ' Take 10 minutes
  1989.  
  1990.   Door Source 4.0
  1991.   Programmer's Manual - Page 55
  1992.  
  1993.         AllTrun$
  1994.  
  1995.         Purpose: To truncate all leading and trailing spaces from a string
  1996.  
  1997.         Syntax: Text$ = AllTrun$(Text$)
  1998.  
  1999.         Remarks: This will remove all of those leading and trailing spaces
  2000.         that are a result of random file input, use of STR$, and other
  2001.         functions of BASIC.
  2002.  
  2003.         Parameters Passed:
  2004.                 Text$ - The string to remove leading and trailing spaces from
  2005.  
  2006.         Parameters Returned:
  2007.                 Text$ - The string without leading and trailing spaces
  2008.  
  2009.         Example:
  2010.                 Text$ = "   These extra spaces will be removed   "
  2011.                 Text$ = AllTrun$(Text$)
  2012.   Door Source 4.0
  2013.   Programmer's Manual - Page 56
  2014.  
  2015.         ANSIMusic
  2016.  
  2017.         Purpose: To play ANSI music to those users who can use it
  2018.  
  2019.         Syntax: CALL ANSIMusic(Music$, Music)
  2020.  
  2021.         Remarks: Some communacations programs can support and play ANSI music
  2022.         but not all of them. Qmodem, for example, will play ANSI music. You
  2023.         should ask your users near the beginning of the program "Do you have
  2024.         ANSI music?" and if they answer yes, then set Music to Yes (1)
  2025.         otherwise set it to No (0). You don't have to use Music, but whatever
  2026.         variable you store that value in should always be the second parameter
  2027.         of the call to this routine. The music string can be anything that
  2028.         the BASIC command PLAY would be able to play. The local speaker
  2029.         won't play the music unless the page bell is on.
  2030.  
  2031.         Parameters Passed:
  2032.                 Music$ - The music to be played
  2033.  
  2034.                 Music - If the user supports ANSI music or not
  2035.                         (1 = Yes  0 = No)
  2036.  
  2037.         Parameters Returned: None
  2038.  
  2039.         Example:
  2040.                 Music = Yes
  2041.                 Music$ = "ABCDEFG"
  2042.                 CALL ANSIMusic(Music$, Music)
  2043.  
  2044.   Door Source 4.0
  2045.   Programmer's Manual - Page 57
  2046.  
  2047.         BackSpace
  2048.  
  2049.         Purpose: To backspace on the local and remote screen and also erase
  2050.         the proper character in the string passed
  2051.  
  2052.         Syntax: CALL BackSpace(Text$)
  2053.  
  2054.         Remarks: This will allow you to write your own input routines for
  2055.         use, and when a user presses the backspace key, call this routine and
  2056.         it will send the proper backspacing codes and erase the backspaced
  2057.         character from the string passed.
  2058.  
  2059.         Parameters Passed:
  2060.                 Text$ - A string that will the backspace will be preformed on
  2061.  
  2062.         Parameters Returned:
  2063.                 Text$ - The new string with the last character erased
  2064.  
  2065.         Example:
  2066.                 IF KeyPressed$ = CHR$(8) THEN
  2067.                    CALL BackSpace(Text$)
  2068.                 END IF
  2069.  
  2070.   Door Source 4.0
  2071.   Programmer's Manual - Page 58
  2072.  
  2073.         BackSpaceOver
  2074.  
  2075.         Purpose: To erase what is already on a line
  2076.  
  2077.         Syntax: CALL BackSpaceOver
  2078.  
  2079.         Remarks: This routine will backspace over everything to column 1,
  2080.         erasing everything on that line. If you have a prompt that you'd
  2081.         like to erase or something, this is the routine to call to erase
  2082.         it.
  2083.  
  2084.         Parameters Passed: None
  2085.  
  2086.         Parameters Returned: None
  2087.  
  2088.         Example:
  2089.                 CALL BackSpaceOver
  2090.  
  2091.         See Also: BackSpaceToCol
  2092.  
  2093.         
  2094.   Door Source 4.0
  2095.   Programmer's Manual - Page 59
  2096.  
  2097.         BackSpaceToCol
  2098.  
  2099.         Purpose: To backspace over to the specified column
  2100.  
  2101.         Syntax: CALL BackSpaceToCol(Col)
  2102.  
  2103.         Remarks: This will backspace over from the current column all the
  2104.         way to the column specified. This is useful if the user inputed a
  2105.         improper response to a prompt and you want to erase just the user's
  2106.         input.
  2107.  
  2108.         Parameters Passed:
  2109.              Col - The column to backspace over to
  2110.  
  2111.         Parameters Returned: None
  2112.  
  2113.         Example:
  2114.                 CALL Send("Backspace to here->this will be erased!",No,No,10)
  2115.                 CALL BackSpaceToCol(20)
  2116.  
  2117.         See Also: BackSpaceOver
  2118.  
  2119.   Door Source 4.0
  2120.   Programmer's Manual - Page 60
  2121.  
  2122.         BeepSpeaker
  2123.  
  2124.         Purpose: To sound the local and remote speaker
  2125.  
  2126.         Syntax: CALL BeepSpeaker
  2127.  
  2128.         Remarks: Calling BeepSpeaker instead of sending a bell code to the
  2129.         screen and com port is better since it will always beep the remote
  2130.         speaker but won't make the local speaker sound unless the page bell
  2131.         is on.
  2132.  
  2133.         Parameters Passed: None
  2134.  
  2135.         Parameters Returned: None
  2136.  
  2137.         Example:
  2138.                 CALL BeepSpeaker        
  2139.         
  2140.   Door Source 4.0
  2141.   Programmer's Manual - Page 61
  2142.  
  2143.         BlockSend
  2144.  
  2145.         Purpose: To send a large amount of information to both displays
  2146.  
  2147.         Syntax: CALL BlockSend(Array$(), Center, Lines.To.Send)
  2148.  
  2149.         Remarks: This will send a large pre-programmed amount of data
  2150.         to the local and remote displays. Color can only be set and
  2151.         changed via @X codes. This routine is good for programmed in
  2152.         documentation, or menus.
  2153.  
  2154.         Parameters Passed:
  2155.                 Array$() - The array to be displayed
  2156.  
  2157.                 Center - Center text to be displayed
  2158.  
  2159.                 Lines.To.Send - Number of array elements to display
  2160.  
  2161.         Parameters Returned: None
  2162.  
  2163.         Example:
  2164.                 Array$(1) = "This will be displayed"
  2165.                 Array$(2) = "Using the BlockSend routine"
  2166.                 CALL BlockSend(Array$(), No, 2)
  2167.  
  2168.         See Also: ColorEasy, RainbowSend, Send, QSend
  2169.  
  2170.   Door Source 4.0
  2171.   Programmer's Manual - Page 62
  2172.  
  2173.         Center
  2174.  
  2175.         Purpose: To aid in centering strings for output
  2176.  
  2177.         Syntax: CALL Center(Text$)
  2178.  
  2179.         Remarks: This will strip out all @X codes and substitute in the
  2180.         proper text for substitution codes and will then set TabSpace to
  2181.         equal the correct column to make the string look centered. The
  2182.         string that you pass is NOT modified by this routine. This routine
  2183.         also will NOT print out the results but only set TabSpace.
  2184.  
  2185.         Parameters Passed:
  2186.                 Text$ - The string to be centered
  2187.  
  2188.         Parameters Returned: None
  2189.  
  2190.         Example:
  2191.                 Text$ = "This will be centered!"
  2192.                 CALL Center(Text$)
  2193.                 CALL Send(Text$, No, Yes, 10)
  2194.   Door Source 4.0
  2195.   Programmer's Manual - Page 63
  2196.  
  2197.         ChangeCTS
  2198.  
  2199.         Purpose: To raise or lower the CTS flag
  2200.  
  2201.         Syntax: CALL ChangeCTS(OnOff)
  2202.  
  2203.         Remarks: This will turn on or off the CTS (Clear To Send) flag
  2204.         which is used to tell the other modem that it is okay to send
  2205.         characters. Modem that don't preform error checking or UARTS
  2206.         that don't have buffers may require CTS flow-control to be on
  2207.         during high speed file transfers.
  2208.  
  2209.         Parameters Passed:
  2210.              OnOff - Whether you want the CTS on or off
  2211.                      (1 = Yes(On)  0 = No(Off))
  2212.  
  2213.         Parameters Returned: None
  2214.  
  2215.         Example:
  2216.              CALL ChangeCTS(No)         ' Turns CTS off
  2217.         
  2218.         See Also: ChangeDTR, ChangeRTS
  2219.   Door Source 4.0
  2220.   Programmer's Manual - Page 64
  2221.  
  2222.         ChangeDTR
  2223.  
  2224.         Purpose: To raise or lower the DTR
  2225.         
  2226.         Syntax: CALL ChangeDTR(OnOff)
  2227.  
  2228.         Remarks: If you want to drop the carrier on someone, this is one of
  2229.         the best ways to do it. Turning the DTR off normally will cut a person
  2230.         off-line, but not always.
  2231.      
  2232.         Parameters Passed:
  2233.              OnOff - Whether you want the DTR on or off
  2234.                      (1 = Yes(On)  0 = No(Off)
  2235.  
  2236.         Parameters Returned: None
  2237.  
  2238.      
  2239.         Example:
  2240.              CALL ChangeDTR(No)         ' Turns off DTR
  2241.  
  2242.         See Also: ChangeCTS, ChangeRTS
  2243.  
  2244.         
  2245.   Door Source 4.0
  2246.   Programmer's Manual - Page 65
  2247.  
  2248.         ChangeRTS
  2249.  
  2250.         Purpose: To raise or lower the RTS flag
  2251.  
  2252.         Syntax: CALL ChangeRTS(OnOff)
  2253.  
  2254.         Remarks: The RTS (Request To Send) flag is uesd by most auto-dial
  2255.         modems to see if a computer is ready to recieve data from the modem.
  2256.         If the RTS signal isn't detected, some modems may refuse to accept
  2257.         modem commands or send result codes.
  2258.  
  2259.         Parameters Passed:
  2260.              OnOff - Whether you want the RTS on or off
  2261.                      (1 = Yes(On)  0 = No(Off))
  2262.  
  2263.         Parameters Returned: None
  2264.  
  2265.         Example:
  2266.              CALL ChangeRTS(No)         ' Turns RTS off
  2267.  
  2268.         See Also: ChangeDTR, ChangeCTS
  2269.  
  2270.   Door Source 4.0
  2271.   Programmer's Manual - Page 66
  2272.  
  2273.         CheckCarrier
  2274.  
  2275.         Purpose: To check if a carrier is present
  2276.  
  2277.         Syntax: CALL CheckCarrier(CarrierPresent)
  2278.  
  2279.         Remarks: This will (as long as Carrier.Check is set to 0) return
  2280.         a Yes (1) or a No (0) in the parameter depending on if the carrier
  2281.         is present. If the global variable Carrier.Check is set to 1, then
  2282.         this routine will return ALWAYS a Yes (1).
  2283.  
  2284.         Parameters Passed: None
  2285.  
  2286.         Parameters Returned:
  2287.              CarrierPresent - Tells if the carrier is present
  2288.                               (1 = Yes  0 = No)
  2289.  
  2290.         Example:
  2291.              CALL CheckCarrier(CarrierPresent)
  2292.              IF CarrierPresent = Yes THEN
  2293.                 CALL Send("You're still connected!", No, Yes, 10)
  2294.              END IF
  2295.            Door Source 4.0
  2296.   Programmer's Manual - Page 67
  2297.  
  2298.         CheckTimeLeft
  2299.  
  2300.         Purpose: To tell you how many minutes a user has left on the system
  2301.  
  2302.         Syntax: TimeRemaining = CheckTimeLeft
  2303.  
  2304.         Remarks: This function will return the number of minutes that the user
  2305.         currently on has left for this call. Be careful not to assign the
  2306.         value returned to a variable named TimeLeft because doing so will
  2307.         modify Door Source's variable and cause the user's time to go berserk!
  2308.  
  2309.         Parameters Passed: None
  2310.  
  2311.         Parameters Returned:
  2312.                 TimeRemaining - The number of minutes left the user has
  2313.  
  2314.         Example:
  2315.                 CALL Send("("+STR$(CheckTimeLeft)+" min. left )", No, No, 14)
  2316.  
  2317.         See Also: AdjustTimeLimit
  2318.  
  2319.   Door Source 4.0
  2320.   Programmer's Manual - Page 68
  2321.  
  2322.         ClrScrn
  2323.  
  2324.         Purpose: To clear the local and remote screens
  2325.  
  2326.         Syntax: CALL ClrScrn
  2327.  
  2328.         Remarks: This will effectively clear the screen for both sides
  2329.         using the fastest method that the caller can use. Setting
  2330.         BackGroundColor previous to calling this routine will cause the
  2331.         entire screen to be that color!
  2332.  
  2333.         Parameters Passed: None
  2334.  
  2335.         Parameters Returned: None
  2336.  
  2337.         Example:
  2338.                 CALL ClrScrn
  2339.  
  2340.   Door Source 4.0
  2341.   Programmer's Manual - Page 69
  2342.  
  2343.         ColorEasy
  2344.  
  2345.         Purpose: To colorize a string and output it
  2346.  
  2347.         Syntax: CALL ColorEasy(Text$, Color.To.Use, Send.Enter)
  2348.  
  2349.         Remarks: If you have a string that you'd like to colorize without
  2350.         having to bother with multiple calls to Send or with @X codes, then
  2351.         use this routine. It will colorize A-Z, a-z, 0-9, and punctuation
  2352.         all in different colors. The Color.To.Use that you specify will
  2353.         affect the output of color over the whole text, experiment with
  2354.         different values to best fit what you need.
  2355.  
  2356.         Parameters Passed:
  2357.                 Text$ - The string to be colorized and displayed
  2358.  
  2359.                 Color.To.Use - This will vary the output for the different
  2360.                                colors used in coloring the text
  2361.  
  2362.                 Send.Enter - Send a CR/LF sequence once displaying is finished
  2363.  
  2364.         Parameters Returned: None
  2365.  
  2366.         Example:
  2367.                 Text$ = "This will be VERY colorful!!"
  2368.                 CALL ColorEasy(Text$, 10, Yes)
  2369.  
  2370.         See Also: BlockSend, RainbowSend, Send, QSend
  2371.  
  2372.   Door Source 4.0
  2373.   Programmer's Manual - Page 70
  2374.  
  2375.         CommInkey$
  2376.  
  2377.         Purpose: To get a key from just the remote keyboard
  2378.  
  2379.         Syntax: Character$ = CommInkey$ 
  2380.  
  2381.         Remarks: This works just like INKEY$ and CommKeyInkey$, except it
  2382.         will take input ONLY from the com port. If there are no characters
  2383.         waiting to be read, then it will return a null.
  2384.  
  2385.         Parameters Passed: None
  2386.  
  2387.         Parameters Returned:
  2388.              Character$ - The character read from the com port
  2389.  
  2390.         Example:
  2391.              DO
  2392.              LOOP UNTIL (CommInkey$ <> "") OR (INKEY$ <> "")
  2393.  
  2394.         See Also: CommKeyInkey$
  2395.   Door Source 4.0
  2396.   Programmer's Manual - Page 71
  2397.  
  2398.         CommKeyInkey$
  2399.  
  2400.         Purpose: To get one character from the local or remote keyboard
  2401.  
  2402.         Syntax: Character$ = CommKeyInkey$
  2403.  
  2404.         Remarks: This will check the local keyboard and the com port buffer
  2405.         for keys waiting to be read, if one is found, it will read it and
  2406.         return it, otherwise it will return a null. If you want to wait for
  2407.         a key to be pressed, you should put this routine in a WHILE loop.
  2408.  
  2409.         Parameters Passed: None
  2410.  
  2411.         Parameters Returned:
  2412.                 Character$ - Either null (if no key was pressed local or
  2413.                              remote) or a key from the keyboard or com port
  2414.                              buffer.
  2415.  
  2416.         Example:
  2417.                 DO
  2418.                    Character$ = CommKeyInkey$
  2419.                 LOOP UNTIL Character$ <> ""
  2420.  
  2421.         See Also: Incomm, CommInkey$
  2422.   Door Source 4.0
  2423.   Programmer's Manual - Page 72
  2424.  
  2425.         CopyAFile
  2426.  
  2427.         Purpose: To quickly copy a file without shelling to DOS
  2428.  
  2429.         Syntax: CALL CopyAFile(Source$, Destination$, ErrCode)
  2430.  
  2431.         Remarks: This will copy a file without the pitfalls of shelling to
  2432.         DOS to do it or of special complex programming. It will return
  2433.         a error code if an error occured.
  2434.  
  2435.         Parameters Passed:
  2436.              Source$ - Drive/Path/Filename of the file to be copied
  2437.  
  2438.              Destination$ - Drive/Path/Filename of the file to be created
  2439.  
  2440.         Parameters Returned:
  2441.              ErrCode - If a error occured during the copy
  2442.                        (1 = Yes  0 = No)
  2443.  
  2444.         Example:
  2445.              Source$ = "MYFILE.TXT"
  2446.              Destination$ = "MYFILE2.TXT"
  2447.              CALL CopyAFile(Source$, Destination$, ErrCode)
  2448.   Door Source 4.0
  2449.   Programmer's Manual - Page 73
  2450.  
  2451.         DayOfWeek
  2452.  
  2453.         Purpose: To calculate the which day of the week it is
  2454.  
  2455.         Syntax: Day = DayOfWeek
  2456.  
  2457.         Remarks: This routine will return a value from 1 to 7 indicating
  2458.         which day of the week it is. A 1 is Sunday, 2 is Monday, and so on.
  2459.  
  2460.         Parameters Passed: None
  2461.  
  2462.         Parameters Returned:
  2463.                 Day - A number from 1-7 representing the day of the week
  2464.  
  2465.         Example:
  2466.                 IF DayOfWeek = 1 THEN
  2467.                    CALL Send("It's SUNDAY!", No, Yes, 14)
  2468.                 ELSE
  2469.                    CALL Send("It's not sunday!", No, Yes, 10)
  2470.                 END IF
  2471.   Door Source 4.0
  2472.   Programmer's Manual - Page 74
  2473.  
  2474.         DoorBusy
  2475.  
  2476.         Purpose: To keep a door from being used by two nodes at once
  2477.  
  2478.         Syntax: CALL DoorBusy
  2479.  
  2480.         Remarks: If you aren't going to program multi-node support, call
  2481.         this routine so that multinode systems won't have problems running
  2482.         your door. You have to set the global variable BusyFile$ to the
  2483.         drive/path/filename of a "lockout file" that will be the signal
  2484.         to other nodes that the door is in use. If another node is using your
  2485.         door, then this routine will call DoorBusy and not return control
  2486.         to your program.
  2487.  
  2488.         Parameters Passed: None
  2489.  
  2490.         Parameters Returned: None
  2491.  
  2492.         Example:
  2493.                 BusyFile$ = "MYDOOR.NET"
  2494.                 CALL DoorBusy
  2495.   Door Source 4.0
  2496.   Programmer's Manual - Page 75
  2497.  
  2498.         EntryIncomm
  2499.  
  2500.         Purpose: To provide a field showing maximum length of input for prompt
  2501.  
  2502.         Syntax: CALL EntryIncomm(Text$, MaxLength, FieldColor, Color.To.Use)
  2503.  
  2504.         Remarks: This is a handy routine to for larger fields (3 characters and
  2505.         larger) that lets the user know what the limit is on the field size by
  2506.         printing above the prompt a (------) field indicator showing the
  2507.         maximum number of characters allowed.
  2508.  
  2509.         Parameters Passed:
  2510.                 Text$ - Prompt to display
  2511.  
  2512.                 MaxLength - Maximum number of characters to allow for input
  2513.                             (Required to be greater than 1)
  2514.  
  2515.                 FieldColor - The color of the (---) field above the prompt
  2516.  
  2517.                 Color.To.Use - The foreground color for the prompt itself
  2518.  
  2519.         Parameters Returned:
  2520.                 ARG$ - The input received
  2521.  
  2522.         Example:
  2523.                 See PRMTDEMO.BAS
  2524.  
  2525.                 Text$ = "Enter your name:"
  2526.                 CALL EntryIncomm(Text$, 20, 10, 11)
  2527.                 ' This would output
  2528.                 '                (--------------------)
  2529.                 ' Enter your name:
  2530.  
  2531.         See Also: PromptIncomm, Incomm
  2532.   Door Source 4.0
  2533.   Programmer's Manual - Page 76
  2534.  
  2535.         ExtendedCode
  2536.  
  2537.         Purpose: To let you trap F-keys in your own I/O routines
  2538.  
  2539.         Syntax: CALL ExtendedCode(CodeToProcess$, NULL)
  2540.  
  2541.         Remarks: If you are writing your own version of Incomm, and would
  2542.         like to take advantage of Door Source's F-Key processing routines,
  2543.         call this with the key pressed and it will take the necessary
  2544.         action, which may be updating the status bar or shelling to DOS.
  2545.  
  2546.         Parameters Passed:
  2547.                 CodeToProcess$ - The two character code of the key pressed
  2548.  
  2549.                 NULL - This variable shouldn't be used by your routine, it
  2550.                 is only used by Door Source and is specified only to maintain
  2551.                 compatibility.
  2552.  
  2553.         Parameters Returned: None
  2554.  
  2555.         Example:
  2556.                 A$ = INKEY$
  2557.                 IF LEN(A$)>1 THEN               ' Extended code
  2558.                    CALL ExtendedCode(A$, NULL)
  2559.                 END IF
  2560.   Door Source 4.0
  2561.   Programmer's Manual - Page 77
  2562.  
  2563.         ExitDoor
  2564.  
  2565.         Purpose: To close the com port and update the bbs interface file
  2566.  
  2567.         Syntax: CALL ExitDoor
  2568.  
  2569.         Remarks: Whenever you want to end your door, you MUST call this
  2570.         routine. NEVER let your door simply just come to an end or have the
  2571.         END or SYSTEM command in it. This routine will uphold the DTR and
  2572.         cleanup Door Source's variables, handlers, etc,... It will also
  2573.         update the bbs interface file with the current information. After
  2574.         calling this routine, control will not be returned to your door.
  2575.  
  2576.         Parameters Passed: None
  2577.  
  2578.         Parameters Returned: None
  2579.  
  2580.         Example:
  2581.                 CALL ExitDoor
  2582.  
  2583.  
  2584.   Door Source 4.0
  2585.   Programmer's Manual - Page 78
  2586.  
  2587.         FileExist
  2588.  
  2589.         Purpose: To detect is a file exists on a disk
  2590.  
  2591.         Syntax: Exists = FileExist(FileName$)
  2592.  
  2593.         Remarks: If you're opening files or preforming something with files
  2594.         you should check, before attempting use, if they exist and not assume
  2595.         that they are there, otherwise your program will generate a error
  2596.         and most likely crash the board it was running on.
  2597.  
  2598.         Parameters Passed:
  2599.                 FileName$ - Drive/Path/Filename to the file to be checked for
  2600.  
  2601.         Parameters Returned:
  2602.                 Exists - If the file exists or not
  2603.                          (-1 = Yes  0 = No)
  2604.  
  2605.         Example:
  2606.                 IF FileExist("MYFILE.FIL") THEN
  2607.                    CALL Send("It exists!", No, Yes, 12)
  2608.                 END IF
  2609.   Door Source 4.0
  2610.   Programmer's Manual - Page 79
  2611.  
  2612.         FileOpen
  2613.  
  2614.         Purpose: To aid in opening files in a better, easier way
  2615.  
  2616.         Syntax: FileNumber = FileOpen(FileName$, Access$, Sharing, Length)
  2617.  
  2618.         Remarks: When you want to open a file and you don't know what the
  2619.         next available file number is, or you don't want to refer to files
  2620.         by their number, or if you don't want to have to fool with checking
  2621.         if a network is active every time a file is opened, this routine
  2622.         is what you should call. It will find the next available file number
  2623.         and open the file according to your specifications and return the
  2624.         file number to you in a variable so you can use it in place of a
  2625.         number.
  2626.  
  2627.         Parameters Passed:
  2628.                 FileName$ - This is the name of the file to be opened
  2629.                 Access$ - The method in which you want to open the file
  2630.                           for access.
  2631.                                 I - Sequential Input
  2632.                                 O - Sequential Output
  2633.                                 A - Append (Write at end of file)
  2634.                                 R - Random Read/Write
  2635.                                 B - Binary Read/Write
  2636.                 Sharing - Will open files to be shared if specified and a
  2637.                           network is active
  2638.                           (1 = Yes  0 = No)
  2639.                 Length - For random and binary files only, this will open
  2640.                          the file with this as the record length.
  2641.  
  2642.         Parameters Returned:
  2643.                 FileNumber - This is the variable you'd use for I/O with the
  2644.                              file. It will contain a -1 if the file wasn't
  2645.                              found that you tried to open only if you're
  2646.                              trying to do sequential input.
  2647.  
  2648.         Example:
  2649.                 FileNumber = FileOpen("MYFILE.FIL", "O", Yes, 0)
  2650.                 PRINT #FileNumber, "This is in the file"
  2651.                 CLOSE #FileNumber
  2652.  
  2653.                 FileNumber = FileOpen("MYFILE.FIL", "I", Yes, 0)
  2654.                 INPUT #FileNumber, DataFromFile$
  2655.                 CLOSE #FileNumber
  2656.   Door Source 4.0
  2657.   Programmer's Manual - Page 80
  2658.  
  2659.         GameInfoUpdate
  2660.  
  2661.         Purpose: To write to the 25 line of the game line of the status line
  2662.  
  2663.         Syntax: CALL GameInfoUpdate(Text$, Send.Enter, ColorFore, ColorBack)
  2664.  
  2665.         Remarks: If you want a game status line, you should use this routine
  2666.         to update line 25 (which will be the game status line). It works
  2667.         just like the PRINT command would work with a few differences.
  2668.         The Send.Enter really doesn't advance to the next line, but resets
  2669.         the column pointer (GameInfoCol) to 1. If you want to start printing
  2670.         someplace other than where you are, just set GameInfoCol to the
  2671.         column number. See the Advanced Programming section for a detailed
  2672.         explanation of how this command works.
  2673.  
  2674.         WARNING: You HAVE to use the DSGAME.INT in your main module instead
  2675.         of DOORSORC.INT otherwise this routine will not work!
  2676.  
  2677.         Parameters Passed:
  2678.                 Text$ - String to be displayed on line 25
  2679.  
  2680.                 Send.Enter - Reset GameInfoCol to 1 after displaying
  2681.                              (1 = Yes  0 = No)
  2682.  
  2683.                 ColorFore - Foreground color to use
  2684.  
  2685.                 ColorBack - Background color to use
  2686.  
  2687.         Parameters Returned: None
  2688.  
  2689.         Example:
  2690.                 Text$ = "This is on the game status line!"
  2691.                 CALL GameInfoUpdate(Text$, No, 0, 7)
  2692.   Door Source 4.0
  2693.   Programmer's Manual - Page 81
  2694.  
  2695.         GetTime
  2696.  
  2697.         Purpose: To separate the time into hours, minutes, and seconds
  2698.  
  2699.         Syntax: CALL GetTime(Hours, Minutes, Seconds, SinceMid#)
  2700.  
  2701.         Remarks: This will take the current time and return it to you
  2702.         in a separated form.
  2703.  
  2704.         Parameters Passed: None
  2705.  
  2706.         Parameters Returned:
  2707.                 Hours - The hour
  2708.  
  2709.                 Minutes - The minute
  2710.  
  2711.                 Seconds - The second
  2712.  
  2713.                 SinceMid# - The number of seconds since midnight
  2714.  
  2715.         Example:
  2716.                 CALL GetTime(Hours, Minutes, Seconds, SinceMid#)
  2717.                 CALL Send("Its "+STR$(Hours)+" o'clock", No, Yes, 10)
  2718.  
  2719.         See Also: TimeConvert
  2720.  
  2721.  
  2722.   Door Source 4.0
  2723.   Programmer's Manual - Page 82
  2724.  
  2725.         HighScores
  2726.  
  2727.         Purpose: To make a high score bulletin
  2728.  
  2729.         Syntax: CALL HighScores(Score, HighScoreFile$, OutputNumber)
  2730.  
  2731.         Remarks: This will take the user's score and use the high score data
  2732.         file specified, update the information, and then either display a
  2733.         bulletin or save it to disk. The high score data file, if
  2734.         non-existent will be created, its a random access file and can't
  2735.         be read/modified in a text editor. Compression can be done with the
  2736.         compression utility included with the Door Source archive. You
  2737.         will need to open the file for output before calling this routine
  2738.         if you want to direct the output to a file, this also allows you
  2739.         to create a header (on screen or in the file) for your bulletin.
  2740.         The format of where HighScores places the information is like this:
  2741.  
  2742. <--21 spaces-------->(NAME OF USER)<---29 spaces--->(SCORE)
  2743.                      John Doe                       100
  2744.                      Jane Doe                       50
  2745.  
  2746.         Parameters Passed:
  2747.                 Score - Score for user
  2748.  
  2749.                 HighScoreFile$ - Name of the random access data file
  2750.                                  that HighScores creates
  2751.  
  2752.                 OutputNumber - The filenumber that output should go to, if
  2753.                                0 then output goes to screen
  2754.  
  2755.         Parameters Returned: None
  2756.  
  2757.         Example:
  2758.                 ScoreDataFile$ = "MYSCORE.SCO"
  2759.                 Score = 569
  2760.                 ScoreBlt = 1
  2761.                 OPEN "SCORES.BLT" FOR OUTPUT AS #1
  2762.                 CALL HighScores(Score, ScoreDataFile$, ScoreBlt)
  2763.   Door Source 4.0
  2764.   Programmer's Manual - Page 83
  2765.  
  2766.         Incomm
  2767.  
  2768.         Purpose: To receive data from the keyboard and com port
  2769.  
  2770.         Syntax: CALL Incomm(Text$, Send.Enter, Max.Characters, Color.To.Use)
  2771.  
  2772.         Remarks: This is the basic input routine, it will check the keyboard
  2773.         and the remote keyboard for input. There are several variables that
  2774.         affect input for this routine, and they are all listed here:
  2775.                 Protected.Input$ - Incomm will show this character in place of
  2776.                                    what is really typed. Setting this to ""
  2777.                                    will cause normal display of input
  2778.  
  2779.                 TabSpace - The string to be displayed will be tabbed to this
  2780.                            column
  2781.  
  2782.                 User.Color - The user's input will be displayed in this color
  2783.  
  2784.                 Caps - Incomm will covert input to all caps before returning
  2785.                        (1 = Yes  0 = No)
  2786.  
  2787.                 No.Enter.Send - After input is completed, a CR/LF won't be
  2788.                                 sent (1 = Yes  0 = No)
  2789.  
  2790.                 EchoKey - Will make input not show up on the screens at all
  2791.                           (1 = Yes  0 = No)
  2792.  
  2793.                 Filter - This will filter out high ascii characters (128+)
  2794.                          (1 = Yes  0 = No)
  2795.  
  2796.                 Table$ - Set this to the only keys you want to be accepted
  2797.                          if you want to limit the user to a few keys. Set it
  2798.                          to Default.Table$ to restore it to normal.
  2799.  
  2800.                 BackGroundColor - This is the background color for the
  2801.                                   prompt and input.
  2802.  
  2803.         Parameters Passed:
  2804.                 Text$ - String to be sent as a prompt
  2805.  
  2806.                 Send.Enter - Send a CR/LF AFTER the prompt and BEFORE input
  2807.                              (1 = Yes  0 = No)
  2808.  
  2809.                 Max.Characters - The maximum number of character to accept
  2810.                                  Setting this to a -1 (or Hockey) will make
  2811.                                  Incomm take the first character it gets and
  2812.                                  not wait for ENTER to be pressed before
  2813.                                  returning.
  2814.                                  (0 = No limit  -1 = Hockey  < 1 = Limit)
  2815.  
  2816.                 Color.To.Use - Foreground color of prompt   Door Source 4.0
  2817.   Programmer's Manual - Page 84
  2818.  
  2819.         Parameters Returned:
  2820.                 ARG$ - The input received
  2821.  
  2822.         Example:
  2823.                 ' You don't need to reset all of these variables each
  2824.                 ' time you call incomm, they are show here just so you
  2825.                 ' can see how they work.
  2826.                 Caps = Yes                      ' Turn input to all caps
  2827.                 Protected.Input$ = "*"          ' Show * instead of letters
  2828.                 Table$="ABCDEFGHIJKLMNOPQRSTUVWXYZ"  ' Only accept A-Z
  2829.                 Text$="Enter your name:"
  2830.                 CALL Incomm(Text$, No, No, 10)
  2831.                 Protected.Input$ = ""           ' Show what is typed
  2832.                 CALL Incomm(Text$, No, 25, 10)  ' Limit to 25 characters
  2833.  
  2834.         See Also: CommInkey$   Door Source 4.0
  2835.   Programmer's Manual - Page 85
  2836.  
  2837.         MenuManager
  2838.  
  2839.         Purpose: To make a scroll bar menu
  2840.  
  2841.         Syntax: CALL MenuManager(Menu$(), Center, TextClr, Bars, SlctClr,
  2842.                 BarFore, BarBack, BarSelected)
  2843.  
  2844.         Remarks: This will create a nice selectable menu with a scroll bar
  2845.         for ANSI users to scroll up and down. Non-ANSI users will see the
  2846.         menu, but will be forced to just enter a number and will have no
  2847.         scroll bar. You shouldn't have more than 20 selections on the menu,
  2848.         and all should be numbered. This routine is affected by several
  2849.         variables which are:
  2850.                 Up.Key$ - The key to move the bar up
  2851.                           (Default to +)
  2852.  
  2853.                 Down.Key$ - The key to move the bar down
  2854.                             (Default to -)
  2855.  
  2856.                 ANSI.Select$ - Selection string displayed for ANSI users
  2857.  
  2858.                 NonANSI.Select$ - Selection string displayed for NON-ANSI users
  2859.  
  2860.         Parameters Passed:
  2861.                 Menu$() - An array with all the menu selections in it
  2862.  
  2863.                 Center - Center the selections while displaying
  2864.  
  2865.                 TextClr - Color for selections
  2866.  
  2867.                 Bars - Number of selections in array
  2868.  
  2869.                 SlctClr - Color for ANSI.Select$ or NonANSI.Select$ string
  2870.  
  2871.                 BarFore - Foreground color for scroll bar
  2872.  
  2873.                 BarBack - Background color for scroll bar
  2874.  
  2875.         Parameters Returned:
  2876.                 BarSelected - The bar selected by the user
  2877.  
  2878.         Example:
  2879.                 See MENUDEMO.BAS included with Door Source
  2880.  
  2881.  
  2882.   Door Source 4.0
  2883.   Programmer's Manual - Page 86
  2884.  
  2885.         MoveCursor
  2886.  
  2887.         Purpose: To position the cursor on the screen
  2888.  
  2889.         Syntax: CALL MoveCursor(X, Y)
  2890.  
  2891.         Remarks: Call this routine to position the cursor anywhere on the
  2892.         screen in the upper 22/23 lines (depending on if there is a game
  2893.         status line). This routine will not move the cursor if the user is
  2894.         not in ANSI mode.
  2895.  
  2896.         Parameters Passed:
  2897.                 X - The row (vertical)
  2898.  
  2899.                 Y - The column (horizontal)
  2900.  
  2901.         Parameters Returned: None
  2902.  
  2903.         Example:
  2904.                 CALL MoveCursor(10, 10)
  2905.  
  2906.  
  2907.   Door Source 4.0
  2908.   Programmer's Manual - Page 87
  2909.  
  2910.         Parser
  2911.  
  2912.         Purpose: To separate data in a string with a delimiter
  2913.  
  2914.         Syntax: CALL Parser(SearchFor$, SearchIn$, ParArray$(), ErrCode)
  2915.  
  2916.         Remarks: This will take a string and look for the character specified
  2917.         and store the data in the array, it then repeats this process over
  2918.         and over until the end of the string has been reached. This can be
  2919.         handy to store numbers in a compact form for storage in a file.
  2920.  
  2921.         Parameters Passed:
  2922.                 SearchFor$ - The string (delimiter) to search for
  2923.  
  2924.                 SearchIn$ - The string to search in and to parse
  2925.  
  2926.         Parameters Returned:
  2927.                 ParArray$() - Contains the data from SearchIn$ but separated
  2928.  
  2929.                 ErrCode - Will greater than 1 is a error occurred
  2930.  
  2931.         Example:
  2932.                 SearchFor$ = "*"
  2933.                 SearchIn$ = "100*200*300*400*500*"
  2934.                 CALL Parser(SearchFor$, SearchIn$, ParArray$(), ErrCode)
  2935.                 FOR X = 1 TO 5
  2936.                    CALL Send(ParArray$(X), No, Yes, 10)
  2937.                 NEXT
  2938.                 ' This would output:
  2939.                 ' 100
  2940.                 ' 200
  2941.                 ' 300
  2942.                 ' 400
  2943.                 ' 500
  2944.   Door Source 4.0
  2945.   Programmer's Manual - Page 88
  2946.  
  2947.         NL
  2948.  
  2949.         Purpose: To send the specified number of times a CR/LF sequence
  2950.  
  2951.         Syntax: CALL NL(Number.Of.Times)
  2952.  
  2953.         Remarks: This will send a CR/LF sequence the number of times you
  2954.         tell it to. This is base routine for all routines to advance to
  2955.         the next line.
  2956.  
  2957.         Parameters Passed:
  2958.                 Number.Of.Times - The number of times to display the CR/LF
  2959.                                   sequence.
  2960.  
  2961.         Parameters Returned: None
  2962.  
  2963.         Example:
  2964.                 CALL NL(3)              ' Print 3 CR/LF sequences
  2965.  
  2966.         See Also: Send
  2967.   Door Source 4.0
  2968.   Programmer's Manual - Page 89
  2969.  
  2970.         PromptIncomm
  2971.  
  2972.         Purpose: To provide a very formatted input field with a prompt
  2973.  
  2974.         Syntax: CALL PromptIncomm(Text$, Default$, DefaultColor, MaxLength,
  2975.                 Color.To.Use)
  2976.  
  2977.         Remarks: This will make a little ( ) area for input to be inside of
  2978.         for ANSI users, non-ANSI users will just have a regular prompt. This
  2979.         routine also allows to easily add a "default" to the prompt.
  2980.  
  2981.         Parameters Passed:
  2982.                 Text$ - Prompt to display
  2983.  
  2984.                 Default$ - "Default" field. Some predefined ones are:
  2985.                            Default1 = (Enter=no)
  2986.                            Default2 = (Enter=none)
  2987.                            Default3 = (Enter=quits)
  2988.  
  2989.                 DefaultColor - Foreground color for default text
  2990.  
  2991.                 MaxLength - Maximum number of characters (Required to be
  2992.                             greater than 0)
  2993.  
  2994.                 Color.To.Use - Foreground color for prompt
  2995.  
  2996.         Parameters Returned:
  2997.                 ARG$ - The input received
  2998.  
  2999.         Example:
  3000.                 See PRMTDEMO.BAS
  3001.  
  3002.                 Text$ = "Enter your name"
  3003.                 CALL PromptIncomm(Text$, Default3, 15, 10, 11)
  3004.                 IF AllTrun$(ARG$) = "" THEN
  3005.                    ' Process default
  3006.                 ELSE
  3007.                    ' Process other
  3008.                 END IF
  3009.                 ' This would output
  3010.                 ' Enter your name (Enter=quits) ? (         )
  3011.                 ' The input would be displayed inside the ( )
  3012.  
  3013.         See Also: EntryIncomm, Incomm
  3014.   Door Source 4.0
  3015.   Programmer's Manual - Page 90
  3016.  
  3017.         QSend
  3018.  
  3019.         Purpose: To send a string local and remote quickly without the
  3020.         extra bells and whistles of Send.
  3021.  
  3022.         Syntax: CALL QSend(Text$, Send.Enter)
  3023.  
  3024.         Remarks: QSend is a very basic sending routine that simply sends
  3025.         the given string to the local and remote screens. @X and other
  3026.         substitution codes are the only form of color control in the
  3027.         strings passed. Extra variables and parameters that affect Send
  3028.         don't affect QSend.
  3029.  
  3030.         Parameters Passed:
  3031.                 Text$ - The string to be sent
  3032.  
  3033.                 Send.Enter - Send a CR/LF after sending is complete
  3034.                              (1 = Yes  0 = No)
  3035.  
  3036.         Parameters Returned: None
  3037.  
  3038.         Example:
  3039.                 Text$ = "This will be displayed in the last color used."
  3040.                 CALL QSend(Text$, Yes)
  3041.  
  3042.         See Also: BlockSend, ColorEasy, RainbowSend, Send, QSend
  3043.  
  3044.   Door Source 4.0
  3045.   Programmer's Manual - Page 91
  3046.  
  3047.         RainbowSend
  3048.  
  3049.         Purpose: To display text in a color, rainbow like form
  3050.  
  3051.         Syntax: CALL RainbowSend(Text$, Bell, Enter, Color.To.Use)
  3052.  
  3053.         Remarks: This is a creative way to display text to both displays.
  3054.         It will take the color given to use, and rotate through the colors
  3055.         making a very colorful display. Experiment with different colors
  3056.         to find the most desirable effect.
  3057.  
  3058.         Parameters Passed:
  3059.                 Text$ - Text to be displayed
  3060.  
  3061.                 Bell - Sound the remote speaker, and local is page bell is on
  3062.  
  3063.                 Enter - Send a CR/LF sequence once displaying is done
  3064.  
  3065.                 Color.To.Use - Foreground color to display text in
  3066.  
  3067.         Parameters Returned: None
  3068.  
  3069.         Example:
  3070.                 Text$ = "This will be displayed"
  3071.                 CALL RainbowSend(Text$, No, Yes, 10)
  3072.  
  3073.         See Also: BlockSend, ColorEasy, Send, QSend
  3074.   Door Source 4.0
  3075.   Programmer's Manual - Page 92
  3076.  
  3077.         RandNum
  3078.  
  3079.         Purpose: To generate a random number within a specified range
  3080.  
  3081.         Syntax: Number = RandNum(Low, High)
  3082.  
  3083.         Remarks: This is handy to generate a random number in the range
  3084.         that you need it. It will generate a completely random number.
  3085.  
  3086.         Parameters Passed:
  3087.                 Low - The lowest number desired
  3088.  
  3089.                 High - The highest number desired
  3090.  
  3091.         Parameters Returned:
  3092.                 Number - The random number generated
  3093.  
  3094.         Example:
  3095.                 CALL Send("The number is "+STR$(RandNum(10,20)), No, Yes, 10)
  3096.  
  3097.  
  3098.   Door Source 4.0
  3099.   Programmer's Manual - Page 93
  3100.  
  3101.         ReadUsers
  3102.  
  3103.         Purpose: To read from the PCBoard 14.x users file
  3104.  
  3105.         Syntax: CALL ReadUsers(ErrCode)
  3106.  
  3107.         Remarks: This will read the user's record from the PCBoard user file
  3108.         specified in the global variable UserFile$. The data will be read into
  3109.         the global type declaration UserBlock (Which is shown in Appendix D -
  3110.         Variable Reference). For other bbs types, most of the data is loaded
  3111.         directly from the bbs interface file, and calling a routine to read
  3112.         the users file is not necessary. The best way to set UserFile$ is
  3113.         to add on another line to the configuration file and read it in
  3114.         yourself after the first call to ClrScrn.
  3115.  
  3116.         Parameters Passed: None
  3117.  
  3118.         Parameters Returned:
  3119.                 ErrCode - This is the error code is a error occurred
  3120.                           1 - Users file not found
  3121.                           2 - Wrong BBS type
  3122.                           3 - UserFile$ not set to Drive/Path/Filename of users
  3123.                               file
  3124.  
  3125.         Example:
  3126.                 See BLCKDEMO.BAS
  3127.  
  3128.                 ' UserFile$ already set earlier in the program
  3129.                 CALL ReadUsers(ErrCode)
  3130.                 CALL Send("You're from "+STR$(UserBlock.CityState), No,Yes,10)
  3131.  
  3132.         See Also: WriteUsers
  3133.   Door Source 4.0
  3134.   Programmer's Manual - Page 94
  3135.  
  3136.         Send
  3137.  
  3138.         Purpose: To display a string to local and remote screens
  3139.  
  3140.         Syntax: CALL Send(Text$, Send.Bell, Send.Enter, Color.To.Use)
  3141.  
  3142.         Remarks: This is the basic sending routine and it will display
  3143.         to the local and remote screens. This routine will accept @X codes
  3144.         and other substitution codes and display the proper things in
  3145.         response to it. A few variables affect this routine's output, here's
  3146.         a list:
  3147.                 BackGroundColor - Background color to be used
  3148.  
  3149.                 TabSpace - The text will be tabbed to this column for display
  3150.  
  3151.         Parameters Passed:
  3152.                 Text$ - The string to be displayed
  3153.  
  3154.                 Send.Bell - Will sound the speaker on the remote and will
  3155.                             also sound the local ONLY if the page bell is on.
  3156.                             (1 = Yes  0 = No)
  3157.  
  3158.                 Send.Enter - Send a CR/LF sequence once displaying is done
  3159.                              (1 = Yes  0 = No)
  3160.  
  3161.                 Color.To.Use - Foreground color to display in
  3162.  
  3163.         Parameters Returned: None
  3164.  
  3165.         Example:
  3166.                 Text$ = "This will be displayed!"
  3167.                 CALL Send(Text$, No, Yes, 10)
  3168.  
  3169.         See Also: BlockSend, ColorEasy, RainbowSend, QSend, WindowPrint
  3170.   Door Source 4.0
  3171.   Programmer's Manual - Page 95
  3172.  
  3173.         ShellToDOS
  3174.  
  3175.         Purpose: To efficiently shell to DOS in order to avoid conflicts
  3176.  
  3177.         Syntax: CALL ShellToDOS(Shell.String$)
  3178.  
  3179.         Remarks: This will let Door Source completely wrap up all of its
  3180.         operations (actually close the com port, but uphold DTR and carrier)
  3181.         so that shelling to a external file transfer program is possible
  3182.         without a conflict of interrupts. This command duplicates what
  3183.         a SHELL command would do in BASIC, but gives Door Source a chance
  3184.         to clean up itself.
  3185.  
  3186.         Parameters Passed:
  3187.                 Shell.String$ - This is the command to be executed once the
  3188.                                 shell is started
  3189.  
  3190.         Parameters Returned: None
  3191.  
  3192.         Example:
  3193.                 Shell.String$ = "DIR >OUTPUT.TXT"
  3194.                 CALL ShellToDOS(Shell.String$)
  3195.   Door Source 4.0
  3196.   Programmer's Manual - Page 96
  3197.  
  3198.         Sorter
  3199.  
  3200.         Purpose: To sort numbers into descending order
  3201.  
  3202.         Syntax: CALL Sorter(ParArray$(), Number.To.Sort)
  3203.  
  3204.         Remarks: If you need to sort numbers parsed with parser, or other
  3205.         numbers in a STRING array, then call this routine and it will
  3206.         sort it into a descending order.
  3207.  
  3208.         Parameters Passed:
  3209.                 ParArray$() - The array of numbers to be sorted
  3210.  
  3211.                 Number.To.Sort - The number of array elements to sort
  3212.  
  3213.         Parameters Returned:
  3214.                 ParArray$() - The sorted array
  3215.  
  3216.         Example:
  3217.                 ParArray$(1) = "400"
  3218.                 ParArray$(2) = "200"
  3219.                 ParArray$(3) = "600"
  3220.                 CALL Sorter(ParArray$(), 3)
  3221.                 FOR X=1 TO 3
  3222.                    CALL Send(ParArray$(X), No, Yes, 10)
  3223.                 NEXT X
  3224.                 ' Output would be this:
  3225.                 ' 600
  3226.                 ' 400
  3227.                 ' 200
  3228.  
  3229.   Door Source 4.0
  3230.   Programmer's Manual - Page 97
  3231.  
  3232.         SysopPage
  3233.  
  3234.         Purpose: To page the sysop if the page bell is on
  3235.  
  3236.         Syntax: CALL SysopPage(Answered)
  3237.  
  3238.         Remarks: This routine will check the page bell, and if on, will
  3239.         page the sysop using the paging sounds. If the page wasn't answered
  3240.         or the sysop isn't around then it will return a 0 in the parameter.
  3241.         This routine is affect by several global variables, which are:
  3242.                 PageSound.1 - Sound #1 to be in the "beep" sound of the page
  3243.  
  3244.                 PageSound.2 - Sound #2 to be in the "beep" sound of the page
  3245.  
  3246.                 PageSound.3 - Sound #3 to be in the "beep" sound of the page
  3247.  
  3248.                 Page.String$ - String to show while paging the sysop
  3249.  
  3250.                 Not.Around$ - String to show when the sysop is not around
  3251.  
  3252.         Parameters Passed: None
  3253.  
  3254.         Parameters Returned:
  3255.                 Answered - If the page was answered
  3256.                            (1 = Yes  0 = No)
  3257.  
  3258.         Example:
  3259.                 CALL SysopPage(Answered)
  3260.  
  3261.   Door Source 4.0
  3262.   Programmer's Manual - Page 98
  3263.  
  3264.         TimeConvert
  3265.  
  3266.         Purpose: To convert from two variables into the HH:MM format
  3267.  
  3268.         Syntax: CALL TimeConvert(Hours, Minutes, NewTime$)
  3269.  
  3270.         Remarks: This will combine hours and minutes into the HH:MM format.
  3271.  
  3272.         Parameters Passed:
  3273.                 Hours - The hour
  3274.  
  3275.                 Minutes - The minute
  3276.  
  3277.         Parameters Returned:
  3278.                 NewTime$ - The hour and minute in HH:MM format
  3279.  
  3280.         Example:
  3281.                 Hours = 10
  3282.                 Minutes = 30
  3283.                 CALL TimeConvert(Hours, Minutes, NewTime$)
  3284.                 CALL Send(NewTime$+" is the next event time.", No, Yes, 10)
  3285.  
  3286.         See Also: GetTime
  3287.  
  3288.  
  3289.   Door Source 4.0
  3290.   Programmer's Manual - Page 99
  3291.  
  3292.         ViewFile
  3293.  
  3294.         Purpose: To display a file to the local and remote screens
  3295.  
  3296.         Syntax: CALL ViewFile(FileName$, ANSICheck, MorePrompts, ExitPrompt)
  3297.  
  3298.         Remarks: This will display a ANSI or non-ANSI screen to both screens.
  3299.         If you specify to check for a ANSI version of the file, then Door
  3300.         Source will take the filename given, add a G to it, and look for
  3301.         the existence of that file for ANSI users. You can enable more
  3302.         prompts for documentation, or leave them off for long ANSI screens.
  3303.         The exit prompt is a "Press [ANY KEY] to continue" prompt that
  3304.         is display at the end of the file if told to do so. The user can
  3305.         abort the screen at any point by pressing the space bar, CTRL-X, or
  3306.         CTRL-K. If the No.Abort global variable is set to 1 (Yes) then
  3307.         the user can't abort the display. ANSI files should NOT exceed
  3308.         80 characters in length per line.
  3309.  
  3310.         Parameters Passed:
  3311.                 FileName$ - Drive/Path/Filename of file to display
  3312.  
  3313.                 ANSICheck - Check for ANSI version of file for ANSI users
  3314.                             (1 = Yes  0 = No)
  3315.  
  3316.                 MorePrompts - Display more prompts every 23 lines
  3317.                               (1 = Yes  0 = No)
  3318.  
  3319.                 ExitPrompts - Displays a "Press [ANY KEY]" prompt at end of
  3320.                               display (1 = Yes  0 = No)
  3321.  
  3322.         Parameters Returned: None
  3323.  
  3324.         Example:
  3325.                 FileName$ = "MYFILE"
  3326.                 CALL ViewFile(FileName$, Yes, No, Yes)
  3327.                 FileName$ = "MYDOCS.DOC"
  3328.                 CALL ViewFile(FileName$, No, Yes, Yes)
  3329.   Door Source 4.0
  3330.   Programmer's Manual - Page 100
  3331.  
  3332.         WaitASec
  3333.  
  3334.         Purpose: To delay the program the specified number of seconds
  3335.  
  3336.         Syntax: CALL WaitASec(Number.Of.Seconds)
  3337.  
  3338.         Remarks: Using the SLEEP command, or a FOR loop to delay a program
  3339.         isn't often a good idea in a door because the user could drop carrier.
  3340.         This routine will delay the program correctly for the number of
  3341.         seconds specified and will also keep track of the carrier signal.
  3342.  
  3343.         Parameters Passed:
  3344.                 Number.Of.Seconds - Number of seconds to delay program
  3345.  
  3346.         Parameters Returned: None
  3347.  
  3348.         Example:
  3349.                 CALL WaitASec(5)        ' delay 5 seconds
  3350.  
  3351.   Door Source 4.0
  3352.   Programmer's Manual - Page 102
  3353.  
  3354.         WindowInput
  3355.  
  3356.         Purpose: To display a prompt and get input from inside a window
  3357.  
  3358.         Syntax: CALL WindowInput(Text$, MaxLength, Row, Col, Fore, Back)
  3359.  
  3360.         Remarks: This works just like the Incomm routine, but does the
  3361.         I/O inside of a window created with the Windows routine. The
  3362.         MaxLength should be just right so that input won't overflow the
  3363.         window border and cause problems with erasing it.
  3364.  
  3365.         Parameters Passed:
  3366.                 Text$ - Prompt to be displayed
  3367.  
  3368.                 MaxLength - Maximum number of characters allowed in input
  3369.  
  3370.                 Row - Row to display at (horizontal)
  3371.  
  3372.                 Col - Column to display at (vertical)
  3373.  
  3374.                 Fore - Foreground color to display prompt in
  3375.  
  3376.                 Back - Background color to display prompt in
  3377.  
  3378.         Parameters Returned:
  3379.                 ARG$ - The input received
  3380.  
  3381.         Example:
  3382.                 Text$ = "Enter your name:"
  3383.                 MaxLength = 25: Row = 13: Col = 12
  3384.                 Fore = 15: Back = 1
  3385.                 CALL WindowInput(Text$, MaxLength, Row, Col, Fore, Back)
  3386.  
  3387.         See Also: Windows, WindowPrint
  3388.   Door Source 4.0
  3389.   Programmer's Manual - Page 102
  3390.  
  3391.         WindowPrint
  3392.  
  3393.         Purpose: To display text inside of a window
  3394.  
  3395.         Syntax: CALL WindowPrint(Text$, Row, Col, Fore, Back)
  3396.  
  3397.         Remarks: This is an easy way of displaying text anywhere inside of
  3398.         a window made with the Windows routine. It can also be used for
  3399.         quick short displays that aren't at the current cursor location.
  3400.  
  3401.         Parameters Passed:
  3402.                 Text$ - Text to be displayed
  3403.  
  3404.                 Row - Row to display at (horizontal)
  3405.  
  3406.                 Col - Column to display at (vertical)
  3407.  
  3408.                 Fore - Foreground color to display with
  3409.  
  3410.                 Back - Background color to display with
  3411.  
  3412.         Parameters Returned: None
  3413.  
  3414.         Example:
  3415.                 Text$ = "This will be displayed"
  3416.                 Row = 12: Col = 12: Fore = 15: Back = 1
  3417.                 CALL WindowPrint(Text$, Row, Col, Fore, Back)
  3418.  
  3419.         See Also: Windows, WindowInput
  3420.   Door Source 4.0
  3421.   Programmer's Manual - Page 103
  3422.  
  3423.         Windows
  3424.  
  3425.         Purpose: To draw window on the local and remote screens
  3426.  
  3427.         Syntax: CALL Windows(ULR, ULC, LRR, LRC, Fore, Back, Border, Shadow)
  3428.  
  3429.         Remarks: This will draw a border enclosed area on the screen, and
  3430.         will even make a shadow if requested. Printing and input is done
  3431.         inside the window with WindowPrint and WindowInput. This is a
  3432.         ANSI only routine, and shouldn't be used with non-ANSI users.
  3433.  
  3434.         Parameters Passed:
  3435.                 ULR - Upper Lefthand row
  3436.  
  3437.                 ULC - Upper Lefthand column
  3438.  
  3439.                 LRR - Lower Righthand row
  3440.  
  3441.                 LRC - Lower Righthand column
  3442.  
  3443.                 Fore - Foreground color to use for border
  3444.  
  3445.                 Back - Background color to use for border and to fill inside
  3446.  
  3447.                 Border - The border number
  3448.                          1 - Single line
  3449.                          2 - Double line
  3450.                          3 - Double horizontal, Single vertical
  3451.                          4 - Single horizontal, Double vertical
  3452.  
  3453.                 Shadow - Makes a shadow on the window
  3454.                          (1 = Yes  0 = No)
  3455.  
  3456.         Parameters Returned: None
  3457.  
  3458.         Example:
  3459.                 ULR = 10: ULC = 10
  3460.                 LRR = 20: LRC = 70
  3461.                 CALL Windows(ULR, ULC, LRR, LRC, 11, 1, 4, Yes)
  3462.  
  3463.         See Also: WindowInput, WindowPrint
  3464.   Door Source 4.0
  3465.   Programmer's Manual - Page 104
  3466.  
  3467.         WriteUsers
  3468.  
  3469.         Purpose: To write to PCBoard 14.x user file
  3470.  
  3471.         Syntax: CALL WriteUsers(ErrCode)
  3472.  
  3473.         Remarks: This will write the user's record to the PCBoard user file
  3474.         specified in the global variable UserFile$. The data written will be
  3475.         from the global type declaration UserBlock (Which is shown in Appendix
  3476.         D - Variable Reference). For other bbs types, most of the data is
  3477.         written when ExitDoor is called, and calling a routine to write to
  3478.         the users file is not necessary. The best way to set UserFile$ is
  3479.         to add on another line to the configuration file and read it in
  3480.         yourself after the first call to ClrScrn.
  3481.  
  3482.         Parameters Passed: None
  3483.  
  3484.         Parameters Returned:
  3485.                 ErrCode - This is the error code is a error occurred
  3486.                           1 - Users file not found
  3487.                           2 - Wrong BBS type
  3488.                           3 - UserFile$ not set to Drive/Path/Filename of users
  3489.                               file
  3490.  
  3491.         Example:
  3492.                 See BLCKDEMO.BAS
  3493.  
  3494.                 ' UserFile$ already set earlier in the program
  3495.                UserBlock.CityState = "Anytown, USA"
  3496.                CALL ReadUsers(ErrCode)
  3497.  
  3498.         See Also: ReadUsers
  3499.  
  3500.                 ░▒▓                                      ▓▒░
  3501.                 ░▒▓ End of Door Source 4.0 Documentation ▓▒░
  3502.                 ░▒▓                                      ▓▒░
  3503.  
  3504.                          Door Source - Version 4.0
  3505.                       Copyrighted 1989,1989,1990,1991
  3506.                               By Todd Miller
  3507.  
  3508.   Door Source 4.0
  3509.   Programmer's Manual - Page 2
  3510.  
  3511.   Table of Contents
  3512.  
  3513.   Introduction
  3514.  
  3515.   The deal on NO registration
  3516.  
  3517.   Some Never Nevers
  3518.  
  3519.   Quick Start
  3520.      Loading Door Source
  3521.      First few lines
  3522.      Testing your door
  3523.  
  3524.   Getting Started
  3525.  
  3526.   Command line options
  3527.  
  3528.   Door Writing Techniques
  3529.  
  3530.   Finishing your door
  3531.  
  3532.   Getting more out of Door Source
  3533.  
  3534.   Advanced Techniques
  3535.  
  3536.   How a door works
  3537.  
  3538.   Converting from 3.2 or before
  3539.  
  3540.   Summary of new features
  3541.  
  3542.   Appendix A - CALL Syntax
  3543.  
  3544.   Appendix B - Optimizing your door
  3545.  
  3546.   Appendix C - Common Questions
  3547.  
  3548.   Appendix D - Variable Reference
  3549.  
  3550.   Appendix E - Script Commands
  3551.  
  3552.   Appendix F - Command Reference
  3553.  
  3554.   Door Source 4.0
  3555.   Programmer's Manual - Page 3
  3556.  
  3557.         Introduction
  3558.         ------------
  3559.            Welcome to Door Source! Door Source is a Quick Basic library,
  3560.     intended for using with versions 4.0 and above. Door Source provides
  3561.     you with a collect of routines to help you interface with a bulletin
  3562.     board and the communications port to make a "door", or otherwise
  3563.     referred to as a third party program, that adds onto the board.
  3564.            Some people don't like having to read a large manual, and rather
  3565.     jump right in with both feet and start off, if you would like to quickly
  3566.     start, please read the following two sections after this introduction.
  3567.     It is advised however, that you read Door Writing Techniques, and
  3568.     Getting More out of Door Source too. If you have previously used
  3569.     Door Source, you should refer to Converting from 3.2 or before and
  3570.     also to the Summary of New Features. Door Source will also be
  3571.     referred to as DS in this manual.
  3572.            Door Source is provided to you free of charge, and you can
  3573.     receive technical support at (919) 294-1770 (DATA 2400 max).
  3574.     Door Source users will be given free access to the other nodes
  3575.     after first calling the number above.
  3576.  
  3577.         Files included
  3578.         --------------
  3579.            Here is a list of files that you should have:
  3580.  
  3581.                 DS40    .QLB - Door Source 4.0 quick library
  3582.                 DS40    .LIB - Door Source 4.0 link library
  3583.                 DS40    .DOC - Door Source 4.0 documentation
  3584.                 DOORSORC.INT - Door Source 4.0 include file
  3585.                 DSGAME  .INT - Door Source 4.0 include file
  3586.                 WINDDEMO.BAS - Window demo using the Window routine
  3587.                 MENUDEMO.BAS - Menu demo using the MenuManager routine
  3588.                 PRMTDEMO.BAS - Prompts demo using various input routines
  3589.                 BLCKDEMO.BAS - A demo using the UserBlock type declaration
  3590.                 ERRDEMO .BAS - A demo with the CarrierLossError variable
  3591.                 SAMPLE  .BAS - A sample door program writting in Door Source
  3592.                 MANUAL  .FRM - A form to order a printed manual with disks
  3593.                 LOADQB  .BAT - A batch file to make loading DS easier
  3594.                 ????????.DS4 - These are special files with extra routines
  3595.                                (DS40.QLB and DS40.LIB already have all of
  3596.                                 these in them)
  3597.                 MAKEDS  .EXE - This will help you select the right object
  3598.                                files for the most compact DS library.
  3599.   Door Source 4.0
  3600.   Programmer's Manual - Page 4
  3601.  
  3602.         The deal on NO registration
  3603.         ---------------------------
  3604.            This may seem extremely odd, but Door Source is offered 100%
  3605.         completely free. There are no registration fees, no more forms,
  3606.         you don't ever have to send us a thing!
  3607.            Why? Many years ago when Door Source was first started on,
  3608.         I realized the need for a better product in the field of door
  3609.         tool kits, and I decided that I would try to fill that gap, but
  3610.         at no charge. All the other door kits (that I know of) ask for
  3611.         some kind of registration, and I think this is truly one of the
  3612.         first that requires none at all.
  3613.            But I do like to know who is using Door Source, and a call to
  3614.         PC-Technologies just to say thanks, or, better yet, to give a
  3615.         suggestion for improvements, is always appreciated! If you have
  3616.         a specific need for a routine or improvement to the Door Source
  3617.         library, you can call and tell it to me, and you're guaranteed
  3618.         that 90% of all improvements or suggestions are added within a
  3619.         few releases!
  3620.  
  3621.   Door Source 4.0
  3622.   Programmer's Manual - Page 5
  3623.  
  3624.         Some Never Nevers
  3625.         -----------------
  3626.            There are some things you never should do when using Door Source.
  3627.         What you shouldn't do is listed below, and since most people won't
  3628.         believe it unless they know why, we have included reasons, and
  3629.         in some cases, alternate routines to use instead.
  3630.  
  3631.         Never use CLS, VIEW PRINT, PRINT, LOCATE, or COLOR because
  3632.            Door Source handles all screen output, and using these
  3633.            will cause Door Source to lose some of its pointers on the
  3634.            screen. Also, on systems using DesqView, it could cause lock ups.
  3635.  
  3636.         Never use OPEN COM or ON COM, because Door Source doesn't use
  3637.            Quick Basic's communication routines, and using these would
  3638.            cause a confliction of interrupts between Door Source and
  3639.            Quick Basic, that would lead to unpredictable results.
  3640.  
  3641.         Never use SCREEN, because Door Source handles screen output,
  3642.            it wouldn't be able to follow your change to a different
  3643.            mode, and would cause serious problems.
  3644.  
  3645.         Never use END or SYSTEM, because that would cause Door Source
  3646.            to leave its interrupt handlers still in place and the
  3647.            next program to run would probably crash.
  3648.  
  3649.         Never use DEFINT, or any of DEF beside DEF FN, because
  3650.            Door Source expects variables to be passed that are in
  3651.            single precision format (the default of Quick Basic).
  3652.  
  3653.         Never use PLAY or SOUND, because it will cause a sound
  3654.            when the sysop using your door program may not want sound,
  3655.            like in the middle of the night, use BeepSpeaker instead
  3656.            of BEEP or SOUND, and AnsiMusic instead of PLAY.
  3657.  
  3658.   Door Source 4.0
  3659.   Programmer's Manual - Page 6
  3660.   
  3661.      Quick Start
  3662.      -----------
  3663.  
  3664.         Installing and loading Door Source
  3665.         ----------------------------------
  3666.            After you have unzipped the Door Source file (assuming that you
  3667.         have since you're reading this), you will only need to copy a few
  3668.         files into your Quick Basic sub-directory. All you will need to
  3669.         copy is DS40.QLB, DS40.LIB, and DOORSORC.INT. Now you are ready
  3670.         to load up Quick Basic, which you can do by typing:
  3671.  
  3672.            QB [your program name] /L DS40
  3673.  
  3674.            You also can add on a /CMD[command$ string] that would place
  3675.         what you put there into COMMAND$ inside Quick Basic. This would
  3676.         be used to easily specify your configuration file for the door,
  3677.         an example is this:
  3678.  
  3679.            QB MYDOOR /L DS40 /CMDTESTDOOR.CFG LOCAL
  3680.  
  3681.            Putting a space in between the /CMD and TESTDOOR.CFG will
  3682.         cause Door Source not to recognize your configuration file
  3683.         properly.
  3684.  
  3685.         The First Few Lines
  3686.         -------------------
  3687.            Once inside the Quick Basic environment, ready to write a
  3688.         new door program, the first line should always be:
  3689.  
  3690.         ' $INCLUDE:'DOORSORC.INT'
  3691.  
  3692.            This will tell Quick Basic to include this file into your
  3693.         program. What this file contains is declarations for the
  3694.         Door Source routines (to help eliminate errors), a COMMON SHARED
  3695.         block, along with a few CONSTant declarations. At the end of the
  3696.         file, it calls the InitDoor routine, which starts Door Source
  3697.         rolling. The next line after that in your program should be:
  3698.  
  3699.         PROGNAME$ = "My Door"
  3700.  
  3701.            You should replace "My Door" with the name of your door. But
  3702.         make sure that it is in quotations, or Quick Basic will give you
  3703.         a Type mismatch error. The name placed in this string shouldn't
  3704.         exceed 20 characters. The next line should be:
  3705.  
  3706.         RELEASE$ = "1.0"
  3707.  
  3708.            This is the release number (or version number) of your door
  3709.         program. It should be less than 6 characters long, and can contain
  3710.         letters and numbers (A-Z, a-z, 0-9), as well as punctuation.
  3711.  
  3712.   Door Source 4.0
  3713.   Programmer's Manual - Page 7
  3714.  
  3715.         CALL ClrScrn
  3716.  
  3717.            CALL ClrScrn should be the next line in your program. It will
  3718.         clear the screen, and now you almost ready to go on about your
  3719.         door, however, there is one last thing. In the DOORSORC.INT, when
  3720.         it calls InitDoor, it will leave a file open for you (file number 1)
  3721.         and this file is the configuration file. If you would like to
  3722.         INPUT anything from it, do that here, and once you are done inputing
  3723.         anything else that was added onto the configuration file, or if
  3724.         you didn't input anything at all, you will need to add one last
  3725.         line, which is:
  3726.  
  3727.         CLOSE #1
  3728.  
  3729.            Now you are ready to write your door. A few basic routines that
  3730.         you should look up are Send (on page XX), Incomm (on page XX),
  3731.         ClrScrn (on page XX), and NL (on page XX). I'm sure you are
  3732.         sick of reading this manual by now, but these are the 4 most
  3733.         basic commands. You should also read Testing Your Door before you
  3734.         try to run the door for the first time, because there are a few
  3735.         things to make sure that you have in your program, and on your
  3736.         disk in order for it to work.
  3737.   Door Source 4.0
  3738.   Programmer's Manual - Page 8
  3739.  
  3740.         Getting Started
  3741.         ---------------
  3742.  
  3743.         Writing a simple program in Door Source
  3744.         ---------------------------------------
  3745.            Before loading Quick Basic, make sure that you have set the
  3746.         proper environment strings to direct Quick Basic to your Door
  3747.         Source directory (if you have one).
  3748.            You will also need to make a configuration file that you
  3749.         can use to test a simple door with. The Door Source configuration
  3750.         file format is a simple four line file. You can make it longer
  3751.         if your door needs information from it (see Advanced Techniques).
  3752.         An example configuration file might be called TESTDOOR.CFG and look
  3753.         like this:
  3754.  
  3755.         C:\PCB\PCBOARD.SYS
  3756.         PC-Technologies
  3757.         Todd
  3758.         Miller
  3759.  
  3760.            The first line is a drive/path/filename to the bbs interface file,
  3761.         and the second line is the name of the bbs using the door. The third
  3762.         line is the first name of the sysop and the fourth line is the last
  3763.         name of the sysop.
  3764.            Now, load up Quick Basic, with the /L (library) switch on it like
  3765.         this:
  3766.  
  3767.         QB /L DS40
  3768.  
  3769.            That will load up Quick Basic and the Door Source library. Two other
  3770.         switches that you might use when loading Quick Basic are:
  3771.  
  3772.         /RUN             - This is put at the beginning of the line right after
  3773.                            QB and will make Quick Basic run the file specified.
  3774.         /CMDMYCONFIG.CFG - The /CMD option always comes at the end, and what
  3775.                            comes DIRECTLY after the /CMD will be loaded into
  3776.                            the COMMAND$, this simulates what you would have
  3777.                            if someone loaded your program like this:
  3778.                            MYDOOR MYCONFIG.CFG
  3779.                            The MYCONFIG.CFG would be put in the COMMAND$, but
  3780.                            if you want to test doors inside Quick Basic, you
  3781.                            should use this option, or set the COMMAND$ from
  3782.                            the Run menu in Quick Basic.
  3783.  
  3784.            Once Quick Basic is loaded, you should press ALT-R to get the
  3785.         Run menu, and the select Modify COMMAND$ (If it isn't listed, then
  3786.         go to the options menu and select Full Menus, then try again). Now
  3787.         enter in the name of the configuration file that you made earlier
  3788.         before loading (If you didn't make it, you can shell to dos from the
  3789.         File menu and make it there). Put after the configuration filename,
  3790.  
  3791.   Door Source 4.0
  3792.   Programmer's Manual - Page 2
  3793.  
  3794.         the word LOCAL. LOCAL will tell Door Source to read the configuration
  3795.         file, but not to use the BBS interface file. Door Source will prompt
  3796.         you for a name, and if you want to use ANSI graphics. This way, you
  3797.         don't have to worry about making a test PCBOARD.SYS, DORINFO1.DEF,
  3798.         CALLINFO.BBS, or DOOR.SYS. If you didn't specify LOCAL, it would look
  3799.         for the bbs interface file that you gave it.
  3800.            Now type the following program into Quick Basic:
  3801.  
  3802.         ' $INCLUDE:'DOORSORC.INT'
  3803.         PROGNAME$="Hello World"
  3804.         RELEASE$="1.0"
  3805.         CALL ClrScrn
  3806.         CLOSE #1
  3807.  
  3808.         CALL Send("Hello World!",No,Yes,10)
  3809.         CALL Incomm("How are you today, @FIRST@ ?",No,No,14)
  3810.         CALL ExitDoor
  3811.  
  3812.            Press the F5 key and the program will run. If you receive an
  3813.         error, refer to Common Questions to find a solution. You should
  3814.         see Door Source ask you for a name, and if you want ANSI graphics.
  3815.         Then the screen will clear and it will say Hello World! in High
  3816.         Intensity Green, and the beneath that it will show How are you today,
  3817.         with your first name. Enter in anything you want and press enter.
  3818.         It will then say Closing Door... and more. You'll also notice that
  3819.         at the bottom of the screen is a status line, and it will be
  3820.         discussed later in this section. Now let's find out how this
  3821.         program works.
  3822.            First, the INCLUDE file has a lot of DECLAREs in it and a
  3823.         COMMON SHARED block, it also makes a CALL to the Door Source
  3824.         routine InitDoor. Inside InitDoor, Door Source will read the
  3825.         configuration file, process the bbs interface file (in this
  3826.         case, it will ask you for your name and if you want ANSI
  3827.         instead), and it will set up the communications port if it
  3828.         is going to be used.
  3829.            In the next two lines, you set up two variables. PROGNAME$
  3830.         should be the name of your program. RELEASE$ should be the
  3831.         version number of your program. Door Source will display these
  3832.         on the status line. PROGNAME$ shouldn't be bigger than 20 characters
  3833.         and RELEASE$ shouldn't be bigger than 5 characters. They both
  3834.         can contain A-Z, a-z, 0-9, and punctuation.
  3835.            Then you make a call to the Door Source routine ClrScrn, which
  3836.         clears the screen (local and remote), and updates the status line.
  3837.         At this point, if you had added onto the configuration file, you
  3838.         would read it here, but since we didn't, we just close the file
  3839.         that InitDoor left open for us.
  3840.   Door Source 4.0
  3841.   Programmer's Manual - Page 2
  3842.  
  3843.            The first four lines of the program above should be the first
  3844.         four lines in all of your doors, except you would replace what
  3845.         PROGNAME$ and RELEASE$ with information for your door.
  3846.            Send is a Door Source routine that outputs (local and remote)
  3847.         a string, and can optionly beep the speaker, and send a enter when
  3848.         done. The number is the color number, here's the format for calling
  3849.         Send.
  3850.  
  3851.         CALL Send("Hello World!", No, Yes, 10)
  3852.                    ^              ^   ^    ^
  3853.                    |              |   |    Color to use
  3854.                    |              |   Send enter when done?
  3855.                    |              Beep the speaker when done?
  3856.                    What to output
  3857.  
  3858.            Incomm is another routine that outputs first and then waits
  3859.         for input back. There are many options that you can use with
  3860.         Incomm, most which are in global variables, which are covered
  3861.         in the reference for it. Here's the way to call Incomm:
  3862.  
  3863.         CALL Incomm("How are you today, @FIRST@ ?", No, No, 14)
  3864.                      ^                              ^   ^   ^
  3865.                      |                              |   |   Color to use
  3866.                      |                              |   Limit the length? If
  3867.                      |                              |   so, max length.
  3868.                      |                              Send enter before input?
  3869.                      What to output first
  3870.  
  3871.            You may have noticed how @FIRST@ wasn't displayed on the screen,
  3872.         but your first name was instead. That's because that when Door Source
  3873.         sees one of these, it knows to replace it with what you want instead.
  3874.         There is a complete list of these in Appendix D.
  3875.            The last call is to ExitDoor, which closes up Door Source files
  3876.         and removes the Door Source interrupt handlers. If you use END
  3877.         instead of ExitDoor, then the interrupt handlers will remain in
  3878.         place, causing the next program to run to crash. ExitDoor will
  3879.         also insure that the caller stays connected while he/she is transferred
  3880.         back to the bbs.
  3881.  
  3882.   Door Source 4.0
  3883.   Programmer's Manual - Page 2
  3884.  
  3885.         Colors
  3886.         ------
  3887.            Door Source can support foreground and background colors. There
  3888.         are three different ways that you can use and change colors too.
  3889.         Here's a color chart:
  3890.  
  3891.         #       Name           Hex     Foreground   Background
  3892.         0       Black           0          Y            Y
  3893.         1       Blue            1          Y            Y
  3894.         2       Green           2          Y            Y
  3895.         3       Cyan            3          Y            Y
  3896.         4       Red             4          Y            Y
  3897.         5       Magenta         5          Y            Y
  3898.         6       Brown           6          Y            Y
  3899.         7       White           7          Y            Y
  3900.         8       Gray            8          Y            N
  3901.         9       HiBlue          9          Y            N
  3902.         10      HiGreen         A          Y            N
  3903.         11      HiCyan          B          Y            N
  3904.         12      HiRed           C          Y            N
  3905.         13      HiMagenta       D          Y            N
  3906.         14      Yellow          E          Y            N
  3907.         15      HiWhite         F          Y            N
  3908.  
  3909.         Way #1 to use color
  3910.         -------------------
  3911.            CALL Send("Hello!",No,No,12)
  3912.            CALL Send("Bye!",No,Yes,10)
  3913.  
  3914.            This would output Hello! in high intensity red and on the same
  3915.            line it would put Bye! in high intensity green.
  3916.  
  3917.         Way #2 to use color
  3918.         -------------------
  3919.            CALL Send("Hello!",No,Yes,HiRed)
  3920.            CALL Send("Bye!",No,Yes,HiGreen)
  3921.  
  3922.            This would output the same thing as above, the only difference
  3923.            is that it is easier to read.
  3924.  
  3925.         Way #3 to use color
  3926.         -------------------
  3927.            CALL Send("Hello!@X0ABye!",No,Yes,12)
  3928.  
  3929.            This would output the same as the first and second way, but
  3930.            this one does it with one string. The whole key to this method
  3931.            is the @X0A code in the middle. It tells Door Source to change
  3932.            colors.
  3933.  
  3934.   Door Source 4.0
  3935.   Programmer's Manual - Page 2
  3936.  
  3937.         Color Code
  3938.         ----------
  3939.            Here's how to use the special color codes:
  3940.  
  3941.                 @X0F
  3942.                 ^^^^
  3943.                 |||Foreground color
  3944.                 ||Background color
  3945.                 |Second part of signal code
  3946.                 First part of signal code
  3947.  
  3948.            You can also change the background color by setting the
  3949.            variable BackGroundColor to a color number on the chart
  3950.            above that is valid a background color (0-7).
  3951.  
  3952.         Command Line Options
  3953.         --------------------
  3954.            Door Source has numerous command line options in order to provide
  3955.         flexibility with most computer systems. Here is a list:
  3956.  
  3957.                 LOCAL       - Forces Door Source to run in local mode. This
  3958.                               is really meant for testing purposes, but it
  3959.                               still reads the configuration file, but doesn't
  3960.                               read the bbs interface file.
  3961.                 NETWORK     - Forces file sharing to be active incase you
  3962.                               are using something other than SHARE to manage
  3963.                               file locking.
  3964.                 IRQ=n       - Lets you change the IRQ used for the com port
  3965.                               specified in the bbs interface file.
  3966.                               (See below for more information)
  3967.                 ADDR=&Hnnnn - Lets you change the address used for the com
  3968.                               port specified in the bbs interface file.
  3969.                               (See below for more information)
  3970.                 PS2         - Forces the PS/2 IRQs and addresses if a PS/2
  3971.                               isn't detected (Normally it is, but you can't
  3972.                               always tell!)
  3973.                 RBBS        - Forces Door Source into RBBS/QBBS mode
  3974.                 WILDCAT     - Forces Door Source into Wildcat 2.0 mode
  3975.                 DOORSYS     - Forces Door Source into 31-Line DOOR.SYS mode
  3976.                 PCB121      - Forces Door Source into PCBoard 11.8/12.x mode
  3977.                               with COM 1 active
  3978.                 PCB122      - Forces Door Source into PCBoard 11.8/12.x mode
  3979.                               with COM 2 active
  3980.                 PCB14       - (DEFAULT) Forces Door Source into PCBoard 14.x
  3981.                               mode
  3982.  
  3983.   Door Source 4.0
  3984.   Programmer's Manual - Page 2
  3985.  
  3986.         When you use the IRQ or the ADDR option, you must include the other.
  3987.         You can't use just the IRQ and not the ADDR, and you can't use just
  3988.         the ADDR and not the IRQ. Here's a chart with the STANDARD IRQs
  3989.         and addresses for the PS/2s and IBM PCs:
  3990.                                 Non PS/2
  3991.                 Com port       IRQ     Address
  3992.                    1             4       &H3F8
  3993.                    2             3       &H2F8
  3994.                    3             4       &H3E8
  3995.                    4             3       &H2E8
  3996.                   5-8            4       &H3F8
  3997.  
  3998.                                 PS/2
  3999.                 Com port       IRQ     Address
  4000.                    1             4       &H3F8
  4001.                    2             3       &H2F8
  4002.                    3             3       &H3220
  4003.                    4             3       &H3228
  4004.                    5             3       &H4220
  4005.                    6             3       &H4228
  4006.                    7             3       &H5220
  4007.                    8             3       &H5228
  4008.  
  4009.   Door Source 4.0
  4010.   Programmer's Manual - Page 2
  4011.  
  4012.         Door Writing Techniques
  4013.         -----------------------
  4014.            When writing a door, you should keep three concepts in mind, they
  4015.         are:
  4016.  
  4017.         1) Compatibility
  4018.         2) Flexibility
  4019.         3) Multi-node
  4020.  
  4021.            A compatible door is a door that easily runs on several bbs types.
  4022.         Door Source currently supports PCBoard 11.8+, PCBoard 14.x, WildCat,
  4023.         RBBS/QBBS DORINFO1.DEF, and the 31-line version of DOOR.SYS. Modifying
  4024.         specific detailed parts of the user's information makes the door
  4025.         less portable, since not all systems have the same information as
  4026.         others.
  4027.            A flexible door is one that allows the sysop to EASILY tell the
  4028.         game where things are, and to set the options that they want.
  4029.         Options like a tournament mode, turns per day, plays per day, etc,...
  4030.         are good options to have. Letting the sysop define text from the
  4031.         door is stretching this a little, but some sysops like this feature.
  4032.         Of course it does mean a lot of work on your part too.
  4033.            A multi-node door is often the hardest to write, but not if you
  4034.         know how. Really it is very easy, easier than most think. You first
  4035.         have to decide how multi-node you want your door to get. For example,
  4036.         you might not won't to try to program something to let two players
  4037.         on at the same time attack each other, so maybe you don't let on
  4038.         go into the same sector as another that is currently on, or you
  4039.         could go for the more complex way and do a one-on-one active battle
  4040.         mode (which players would like). But the one thing all multi-node
  4041.         doors must do is to share files correctly, and the way to do this
  4042.         is to open files as SHARED, and to LOCK and UNLOCK individual records.
  4043.         You will also want to keep in contact with other nodes playing
  4044.         your door at the same time, and this can be done with a simple file
  4045.         that would be organized by node. It would tell the other nodes if
  4046.         it was running maintenance (so the others would play while it was), or
  4047.         to tell the other nodes where someone is. In the Door Source Door
  4048.         tool kit, it contains routines to maintain a file, and others to
  4049.         help make your door more multinode. A multi-node door is always
  4050.         praised by the sysops of a multi-node system.
  4051.  
  4052.         Quick Basic problems
  4053.         --------------------
  4054.            Quick Basic does have a few problems, and you will encounter them
  4055.         if you are working on a large door project. You will probably
  4056.         encounter a "Out of Stack Space" or a "Out of Data Space" error.
  4057.         I've found that exiting to DOS and then coming back will usually
  4058.         solve the problem. If not, then its time to do some work on your
  4059.         program. If you know that you're door will be large, or if your
  4060.         door gets larger than you expected, then here are a few tips on
  4061.         how to get rid of these problems, or to prevent them:
  4062.  
  4063.   Door Source 4.0
  4064.   Programmer's Manual - Page 2
  4065.  
  4066.                 1) Use variables, not constants. When you call a routine,
  4067.                    like Send, and pass it a constant, the space that the
  4068.                    constant used is not released for other programs to use.
  4069.                    Instead, it stays in memory until your program quits.
  4070.                    So call Send or other routines this way, by defining your
  4071.                    variable first.
  4072.  
  4073.                         Lin$="Hello!":ColorToUse=10
  4074.                         CALL Send(Lin$, No, Yes, ColorToUse)
  4075.  
  4076.                    If you didn't set up the variables before hand, you
  4077.                    would have just used up 12 bytes of stack space that
  4078.                    wouldn't be made available for other things. (I didn't
  4079.                    miscount, a string has a 4 byte discriptor on it.)
  4080.  
  4081.                 2) Use MAKEDS so that your Door Source library will be
  4082.                    as small as possible, and so it won't take up extra
  4083.                    space with routines you don't need.
  4084.  
  4085.                 3) Use as few variables as possible. You should set aside
  4086.                    two or three variables for your loops, a few for input,
  4087.                    and a few for output, etc,... Just don't go around
  4088.                    putting in new variables, because it will eliminate
  4089.                    stack space.
  4090.  
  4091.                 4) If you are using your own COMMON SHARED block, eliminate
  4092.                    all unnecessary variables from it, and don't declare
  4093.                    a function or subroutine as STATIC unless necessary.
  4094.  
  4095.         Large doors
  4096.         -----------
  4097.            When writing LARGE doors with Door Source, you should use
  4098.         a multi-module program. To create a new module, you must select
  4099.         the Create file option from the file menu (full menus only).
  4100.         Here are some tips for writing large doors:
  4101.  
  4102.                 1) Make a COMMON SHARED block for each of your modules
  4103.                    that has commonly used variables.
  4104.  
  4105.                 2) Include the DOORSORC.INT at the beginning of each module
  4106.                    so that it can use the Door Source routines and variables.
  4107.  
  4108.                 3) Make as many things as possible a routine or a function,
  4109.                    and place those routines and functions into a module of
  4110.                    their own (You could even have several modules of routines).
  4111.  
  4112.                 4) Remember that you can't GOTO or GOSUB to a line number or a
  4113.                    label in another module.
  4114.  
  4115.   Door Source 4.0
  4116.   Programmer's Manual - Page 2
  4117.  
  4118.                 5) Anything that is done more than once is a good candidate for
  4119.                    routine or function, even if it just calculates a score
  4120.                    or shows lots of information.
  4121.  
  4122.                 6) When calling routines (Door Source or your own), pass
  4123.                    variables, not constants to them.
  4124.  
  4125.   Door Source 4.0
  4126.   Programmer's Manual - Page 2
  4127.  
  4128.         Gathering Data from the User
  4129.         ----------------------------
  4130.            When writing your door, you will want to keep a consistent, but
  4131.         friendly and easy to use approach to receiving information back from
  4132.         the user. Using the PromptIncomm or EntryIncomm is a good way to
  4133.         gather a limited amount of data, PromptIncomm is most useful for
  4134.         yes and no questions, and for amounts. EntryIncomm is good for
  4135.         long replies (sentences, names, etc,...).
  4136.            You can also vary Incomm in a number of ways, the Incomm routine
  4137.         is the kernel for PromptIncomm and EntryIncomm. You can write your own
  4138.         routine to first do your special prompt and then call Incomm. For
  4139.         example, if you wanted to make a prompt that used RainbowSend so the
  4140.         prompt is lots of different colors, you could do this:
  4141.  
  4142.         SUB RainbowInput(Text$, LimitField)
  4143.            CALL RainbowSend(Text$, No, No, 11)
  4144.            CALL Incomm("", No, LimitField, Last.Clr.Used)
  4145.         END SUB
  4146.  
  4147.            This would be output Text$ (the prompt) using RainbowSend first,
  4148.         then use Incomm to receive the data. The variable, Last.Clr.Used, is
  4149.         a Door Source variable that has the number of the last color used
  4150.         stored in it.
  4151.            If you have specific keys that you want the user to use and to
  4152.         lock out the others, use the Table$ and Default.Table$ to limit
  4153.         the input to certain keys, for example:
  4154.  
  4155.            Table$="YN"
  4156.            CALL Incomm("Do you want to quit (Y/N) ? ", No, 1, 14)
  4157.            Table$=Default.Table$
  4158.  
  4159.            The above example first sets Table$ to equal YN, now Door Source
  4160.         will only allow the user to input the letters Y and N (Lower case
  4161.         will NOT work, you have to add in the lower case letters too!).
  4162.         The last line sets Table$ back to the default (when Door Source
  4163.         starts, Table$ is already at the default). This is very important
  4164.         so that you don't accidentally keep limiting input when you don't
  4165.         want to. Also, NEVER change Default.Table$, doing so will make it
  4166.         only harder on you to undo the Table$ setting. You don't have to
  4167.         worry about adding in characters like backspace or enter, because
  4168.         Door Source assumes that you will want to let the user use those
  4169.         keys. Table$ does not affect any output routines, only the Door
  4170.         Source input routines (except CommInkey$ and CommKeyInkey$ functions)
  4171.  
  4172.   Door Source 4.0
  4173.   Programmer's Manual - Page 2
  4174.  
  4175.         Making friendly menus
  4176.         ---------------------
  4177.            Friendly menus (to you and the user) are menus that can be
  4178.         aborted in the middle of display. To make a friendly menu in
  4179.         Door Source, define a array and put your menu in it. This also
  4180.         makes it easy for you to make a quick change to one or all of
  4181.         your menus if you have all of the arrays in the same place.
  4182.         An example of how to make a friendly menu would be:
  4183.  
  4184.         CONST Main.Menu.Length = 5
  4185.  
  4186.         DIM Main.Menu$(5)
  4187.  
  4188.         Main.Menu$(1)="(1) Quit"
  4189.         Main.Menu$(2)="(2) Quit"
  4190.         Main.Menu$(3)="(3) Quit"
  4191.         Main.Menu$(4)="(4) Quit"
  4192.         Main.Menu$(5)="(5) Quit"
  4193.  
  4194.         CALL BlockSend(Main.Menu$(), No, Main.Menu.Length)
  4195.  
  4196.            If the user was to press the space bar, CTRL-X, or CTRL-K while
  4197.         the menu was displaying, it would stop displaying and let your
  4198.         program go on to receive the input.
  4199.            Another form of the friendly menu (but doesn't allow aborting)
  4200.         is using MenuManager to display your menu, and allows ANSI users to
  4201.         use a scroll bar to scroll up and down and make their choice, and
  4202.         allows non-ANSI users to enter their selection.
  4203.  
  4204.         Presenting information in a compact format
  4205.         ------------------------------------------
  4206.            Displaying ten, twenty character long lines, on ten separate lines
  4207.         is a waste of space. Instead, you could compact the display to five
  4208.         lines, or even less. Setting TabSpace in between calls to one of the
  4209.         Send routines will let you make a nicely formatted display, for example:
  4210.  
  4211.            CALL Send("Info #1:"+Info1$, No, No, 10)
  4212.            TabSpace = 40
  4213.            CALL Send("Info #2:"+Info2$, No, Yes, 10)
  4214.            CALL Send("Info #3:"+Info3$, No, No, 10)
  4215.            TabSpace = 40
  4216.            CALL Send("Info #4:"+Info4$, No, Yes, 10)
  4217.  
  4218.         Would look like:
  4219.  
  4220.         Info #1: Something                      Info #2: Something else
  4221.         Info #3: Anything                       Info #4: Anything else!
  4222.  
  4223.   Door Source 4.0
  4224.   Programmer's Manual - Page 2
  4225.  
  4226.            If you want to display information from an array in a compact
  4227.         format, you could do this:
  4228.  
  4229.            Stack = 0
  4230.            FOR X = 1 TO 10
  4231.               IF Stack = 0 THEN
  4232.                  CALL Send("Info :"+Info$(X), No, No, 10)
  4233.                  TabSpace = 40
  4234.                  Stack = 1
  4235.               ELSE
  4236.                  CALL Send("Info :"+Info$(X), No, Yes, 10)
  4237.                  Stack = 0
  4238.               END IF
  4239.            NEXT X
  4240.            IF TabSpace = 40 THEN TabSpace = 0
  4241.  
  4242.            In the above example, the variable Stack changes from 0 to 1 and
  4243.         back again to keep track of whether or not it's time to tab over to
  4244.         column 40 or to end the line. The IF after the NEXT X makes sure that
  4245.         you aren't set at column 40 for your next output when you don't want
  4246.         to be.
  4247.            You could also put in another IF block inside the FOR loop to let
  4248.         you decide whether or not you have any information to display or not.
  4249.         You could also modify all the above examples so that you could have
  4250.         three columns and not just two.
  4251.  
  4252.         The Configuration File
  4253.         ----------------------
  4254.            You can make the configuration file for your door program larger
  4255.         than what Door Source requires it to be, and you can read in the
  4256.         information yourself too. Door Source automatically reads in the
  4257.         first four lines of the configuration file and sets everything up
  4258.         for you to read the rest. Reading more from the configuration file
  4259.         is simple:
  4260.  
  4261.         ' $INCLUDE:'DOORSORC.INT'
  4262.         ProgName$="Configuration Reader"
  4263.         Release$="1.0"
  4264.         LINE INPUT #1, ExtraInfo$
  4265.         LINE INPUT #1, ExtraNumber
  4266.         CLOSE #1
  4267.         CALL ClrScrn
  4268.  
  4269.            Even though there is no open statement, Door Source opened the
  4270.         file and read the information from it already (It did this from in
  4271.         the DOORSORC.INT). Remember to close the file after use, even if you
  4272.         don't use it at all. The only limit to how long your configuration
  4273.         file can be is the disk space and the amount of memory you can
  4274.         use to store the information. The configuration file can not be
  4275.         in a random access format, only sequential.
  4276.   Door Source 4.0
  4277.   Programmer's Manual - Page 2
  4278.  
  4279.         Testing your Door
  4280.         -----------------
  4281.            The easiest way to test your door is to run it from inside the
  4282.         Quick Basic environment. You first have to have three things done
  4283.         so that you can, and they are:
  4284.  
  4285.                 1) Have a sample configuration file in the Quick Basic
  4286.                    directory.
  4287.  
  4288.                 2) Load Quick Basic with the /L option and DS40 after it
  4289.                    For example:
  4290.                         QB /L DS40 /CMDTESTDOOR.CFG LOCAL
  4291.  
  4292.                 3) Load Quick Basic with the /CMD option and your configuration
  4293.                    file's name after it with the word LOCAL.
  4294.                    (See above example)
  4295.  
  4296.            If you forgot to load with the /CMD option, you can set it from
  4297.         inside Quick Basic from the Run menu (Modify COMMAND$).
  4298.            Now all you have to do is press F5 to run your program. If you
  4299.         have any problems, refer to Appendix C - Common Questions.
  4300.  
  4301.   Door Source 4.0
  4302.   Programmer's Manual - Page 2
  4303.  
  4304.         Finishing your Door
  4305.         -------------------
  4306.            To eliminate all possible problems, you should first thoroughly test
  4307.         you door in two manners, logically, and unlogically. When you are
  4308.         logically testing it, you should use your door the way you designed
  4309.         it to be used, noting the little problems as you go. Then when you
  4310.         unlogically test it, you try testing your program in a way completely
  4311.         opposite of how you designed it. This method is a through method to
  4312.         debug your program. You will find most of the errors through this
  4313.         method, but then there are always situations that even you didn't
  4314.         think of in either of these manners.
  4315.            To finish a door you will need to compile to door into a EXE format.
  4316.         This way you can use the door without having to load QuickBasic to run
  4317.         your doors. Since Door Source doesn't use Quick Basic's communications
  4318.         routines, you CAN compile your door to be a stand-alone program, that
  4319.         doesn't need BRUN45.EXE. If you prefer to not make it a stand-alone,
  4320.         you do not have to use a patched version of BRUN45.EXE like other
  4321.         door packages require.
  4322.            In order to compile your program, you must go to the Run menu and
  4323.         select Make EXE. It will compile your program in memory and then
  4324.         a window will pop up asking what you want the final file name of the
  4325.         program to be, and other options. Do not select the produce debug
  4326.         code option, it will only make your program larger and slower, and
  4327.         allow people to break it in the middle by pressing CTRL-Break. After
  4328.         you have everything like you want it, select one of the button on the
  4329.         bottom of the window to start the process.
  4330.            Of course, you'll need to provide some documentation for your
  4331.         door, and good documentation should have some of these sections listed
  4332.         here:
  4333.                 Table of contents
  4334.                 Disclaimer
  4335.                 Overview/Summary of the door
  4336.                 List of files in archive
  4337.                 Configuration file setup
  4338.                 Command line options
  4339.                 Batch file setup
  4340.                 Customization instructions
  4341.                 List of function/ALT keys
  4342.                 Possible errors/Troubleshooting
  4343.  
  4344.            A good disclaimer is always something that is hard to come by, here
  4345.         is a disclaimer that pretty much covers you:
  4346.  
  4347.                 This program and other files associated with it are not
  4348.                 guaranteed to be bug free or virus free. We are not
  4349.                 responsible for any damages of any kind, including
  4350.                 profit loses and data loss, that relate directly or
  4351.                 indirectly to these programs and files. You may
  4352.                 distribute this program, as long as it is in unmodified
  4353.                 form with all the files originally included.
  4354.  
  4355.   Door Source 4.0
  4356.   Programmer's Manual - Page 2
  4357.  
  4358.            You may wish to add/change/delete something from this one, but it
  4359.         is a pretty good one. A overview or summary of the door would be a
  4360.         simple explanation of exactly what your door does, no specifics
  4361.         really. The configuration file section should show a sample
  4362.         configuration file, and give a sentence or two on each line in the
  4363.         file. The command line options should show the user how to
  4364.         configure the door to run with his system. Refer to the chapter
  4365.         on command line options to put into your documentation.
  4366.            The batch file setup should show a few example batch files, and
  4367.         telling you if you need to add it in your daily event, etc,...
  4368.         The customization section should tell the sysop that uses your door
  4369.         how to better customize it to what he needs. Some examples might be
  4370.         aliases allowed/not allowed, location of files, prompts, etc,...
  4371.            The list of function keys is basically this:
  4372.  
  4373.                   F3  - Printer toggle
  4374.                   F4  - Page bell toggle
  4375.                   F5  - Shell to DOS
  4376.                   F7  - Caller alarm toggle
  4377.                   F8  - Return caller to board
  4378.                   F10 - Start sysop chat
  4379.                   ESC - Enter sysop chat
  4380.                 ALT-X - Drop to DOS after caller logs off
  4381.                 ALT-N - Sysop next on flag
  4382.  
  4383.            Troubleshooting should list a few possible errors that might
  4384.         occur, and how to solve them. Like if error number 53 (File not found)
  4385.         occurs, then search your configuration file for a misspelled filename
  4386.         or a wrong path. If error 61 (Disk full) occurs, free up disk space.
  4387.         Some errors can't be solved, and you could list those and have them
  4388.         call a bulletin board for more help.
  4389.  
  4390.   Door Source 4.0
  4391.   Programmer's Manual - Page 2
  4392.  
  4393.         Getting more out of Door Source
  4394.         -------------------------------
  4395.  
  4396.         This section and the following section, Advanced Techniques, are
  4397.         very closely related. With Door Source 4.0, it is basically possible
  4398.         for you to write your own input and output routines using out base
  4399.         routines to do the dirty work. The difference in between this section
  4400.         and the next is simply that this tells you how to take advantage of
  4401.         some of the new variables and features, and the next section tells
  4402.         you more on programming more advanced things with Door Source.
  4403.  
  4404.         The definable page sound
  4405.         ------------------------
  4406.  
  4407.            You can easily change the sound of the SysopPage routine by
  4408.         setting 3 variables - PageSound.1, PageSound.2, and PageSound.3
  4409.         The sound generated is in the order of PageSound.1, then PageSound.2,
  4410.         and then the final sound is PageSound.3. The numbers you put in
  4411.         PageSound should be in the acceptable range of the SOUND command,
  4412.         which is somewhere around 45-32767. A page sound of 200, 400, 600
  4413.         would make a sound that starts out low, then the next sound is
  4414.         about double the pitch of the first, and the third is double the
  4415.         pitch of the second. Its possible to create a variety of different
  4416.         sounds with this, try experimenting with the SOUND command first to
  4417.         find what you like the best. The duration of the sounds is set, and
  4418.         can't be changed.
  4419.                 Example:
  4420.                 PageSound.1=200
  4421.                 PageSound.2=400
  4422.                 PageSound.3=600
  4423.                 CALL SysopPage(Answered)
  4424.  
  4425.         Filtering your input
  4426.         --------------------
  4427.  
  4428.            Sometimes, you may want to limit the input to a question to a
  4429.         few letters, or selectively not recognize certain characters. To
  4430.         do so, you should set the Table$ variable. An example would be:
  4431.                 Example:
  4432.                 Table$ = "YNyn"
  4433.                 CALL Incomm("You can only type Y and N:",No,1,15)
  4434.                 ' Anything else besides Y,N,y,n that the user types is
  4435.                 ' not displayed or recognized. Backspace and enter CAN NOT
  4436.                 ' be filtered out.
  4437.                 Table$ = Default.Table$
  4438.                 ' This is necessary to reset the filter back to normal,
  4439.                 ' if you didn't do this then you'll have problems with
  4440.                 ' later Incomm commands still being restricted with the
  4441.                 ' filtering.
  4442.                 Output:
  4443.                 You can only type Y and N:Y   Door Source 4.0
  4444.   Programmer's Manual - Page 2
  4445.  
  4446.         Protecting input from prying eyes
  4447.         ---------------------------------
  4448.  
  4449.            When a password or something secret needs to be concealed, you
  4450.         can now set a "substitution character" that will be displayed in
  4451.         place of what the user really types. You can make the character
  4452.         anything you wish, but making it a null turns it off.
  4453.                 Example:
  4454.                 Protected.Input$="*" ' Now shows a * in place of text
  4455.                 CALL Incomm("Password:", No, No, 15)
  4456.                 Protected.Input$=""  ' Turns it off - Back to normal display
  4457.                 Output:
  4458.                 Password:******
  4459.  
  4460.         Two fancier input prompts
  4461.         -------------------------
  4462.  
  4463.            EntryIncomm
  4464.            -----------
  4465.            EntryIncomm prints out a field of (----) above the area where
  4466.            the user's input will be displayed. The size of the field is based
  4467.            on how big you make the field. Good for ANSI and NON-ANSI!
  4468.                 Example:
  4469.                 CALL EntryIncomm("Your new name:", 25, LightGreen, Yellow)
  4470.                 '                                  ^ Field size
  4471.                 Output:
  4472.                              (-------------------------)
  4473.                 Your new name:Zantigahicatal
  4474.  
  4475.            PromptIncomm
  4476.            ------------
  4477.            PromptIncomm is most useful in ANSI cases, but will handle
  4478.            non-ansi well too, but the purpose of the routine is defeated
  4479.            then. What it does is create a field similar to the EntryIncomm
  4480.            but the field is on the same line as the input. The second text
  4481.            field is the "default field" tells the user what it defaults to
  4482.            if they press enter, but its up to you to interpret them pressing
  4483.            enter. You can pass a string as the second parameter, and it
  4484.            will use that instead of one of the already programmed constants.
  4485.            The constants are:
  4486.                 Default1 = (Enter=no)
  4487.                 Default2 = (Enter=none)
  4488.                 Default3 = (Enter=quits)
  4489.  
  4490.                 Example:
  4491.                 CALL PromptIncomm("Do you wish to quit",Default1,
  4492.                         LightGreen, 1, Yellow)
  4493.                 '                   ^ Field size
  4494.                 Output:
  4495.                 Do you wish to quit (Enter=no) ? (N)
  4496.  
  4497.   Door Source 4.0
  4498.   Programmer's Manual - Page 2
  4499.  
  4500.            Unabortable ViewFiles
  4501.            ---------------------
  4502.            Do you want to force the user to see out an entire file? Its easy
  4503.            to block the abort codes by setting the variable No.Abort to YES,
  4504.            then when the user tries to abort, it won't let him. However, if
  4505.            more prompts are still offered, answering NO to it will stop the
  4506.            display.
  4507.                 Example:
  4508.                 No.Abort = YES
  4509.                 CALL ViewFile("MYFILE.ANS", No, No, No)
  4510.                 No.Abort = NO   ' Reset it back to normal
  4511.  
  4512.            Disabling carrier checking
  4513.            --------------------------
  4514.            How would you like to turn off carrier checking for a
  4515.            call back verification program of some sort, or something
  4516.            along those lines? Try setting Carrier.Check to YES, and
  4517.            Door Source will *IGNORE* the carrier detect flag. If the
  4518.            user drops carrier, you'll have to handle and detect yourself!
  4519.                 Example:
  4520.                 Carrier.Check = No  ' Disables carrier checking
  4521.                 Carrier.Check = Yes ' (Default) enables carrier checking
  4522.  
  4523.            Checking the baud and the carrier, setting DTR, CTS, and RTS
  4524.            ------------------------------------------------------------
  4525.  
  4526.               Checking the baud rate
  4527.               ----------------------
  4528.               The variable Baud& has the baud rate stored in it. Here's
  4529.               what the number in it means:
  4530.                         1       - Local mode
  4531.                         300     - 300 baud
  4532.                         1200    - 1200 baud
  4533.                         2400    - 2400 baud
  4534.                         4800    - 4800 baud
  4535.                         9600    - 9600 baud
  4536.                         -192    - 19,200 baud
  4537.                         -384    - 38,400 baud
  4538.                         -1152   - 115,200 baud
  4539.  
  4540.               Checking the carrier
  4541.               --------------------
  4542.               The routine CheckCarrier will tell you if a carrier is
  4543.               present.
  4544.                 Example:
  4545.                 CALL CheckCarrier(CarrierFlag)
  4546.                 IF CarrierFlag = NO AND Baud& > 1 THEN
  4547.                    CALL ExitDoor  ' Carrier lost!
  4548.                 END IF
  4549.  
  4550.   Door Source 4.0
  4551.   Programmer's Manual - Page 2
  4552.  
  4553.               Setting the DTR, CTS, and RTS
  4554.               -----------------------------
  4555.  
  4556.                 DTR
  4557.                 ---
  4558.                 The DTR (Data Terminal Ready) when on normally means that
  4559.                 you are on-line, and have a connection. However, on most
  4560.                 modems, turning it off while it is on will break the
  4561.                 connection.
  4562.                         Example:
  4563.                         CALL ChangeDTR(YES)   ' Turn DTR on
  4564.                         CALL ChangeDTR(NO)    ' Turn DTR off
  4565.  
  4566.                 CTS Control On/Off
  4567.                 ------------------
  4568.                 CTS (Clear To Send) is used to signal the other modem that
  4569.                 it is ok to send characters. Modems that don't preform
  4570.                 error checking or UARTS that don't have buffers may require
  4571.                 CTS flow-control to be on during high-speed file transfers.
  4572.                         Example:
  4573.                         CALL ChangeCTS(YES)   ' Turn CTS control on
  4574.                         CALL ChangeCTS(NO)    ' Turn CTS control off
  4575.  
  4576.                 RTS
  4577.                 ---
  4578.                 RTS (Request To Send) is used by most auto-dial modems to
  4579.                 see if a computer is ready to receive data from the modem.
  4580.                 If the RTS signal isn't detected, some modems may refuse
  4581.                 to accept modem commands or send result codes.
  4582.                         Example:
  4583.                         CALL ChangeRTS(YES)   ' Turn RTS on
  4584.                         CALL ChangeRTS(NO)    ' Turn RTS off
  4585.  
  4586.            Automatic more prompts
  4587.            ----------------------
  4588.            If you're displaying lots of information, like programmed in
  4589.            documentation, and you don't want to keep track of when you
  4590.            need to show a more prompt or a press any key prompt, just
  4591.            simply set the AutoMore variable to one of the settings:
  4592.                 0                              Disables the prompts (default)
  4593.                 MorePrompt    (Or the value 1) Causes automatic more prompts
  4594.                 PressKeyPromp (Or the value 2) Causes automatic press any key
  4595.                 Example:
  4596.                     AutoMore = MorePrompt
  4597.            The variable Lines.Since will tell you how many lines have been
  4598.            sent SINCE the last ClrScrn WITH one of the Send routines or
  4599.            Incomm routines. The automatic prompts are by default not
  4600.            enabled, and when enabled, they occur every 23 lines.
  4601.  
  4602.   Door Source 4.0
  4603.   Programmer's Manual - Page 2
  4604.  
  4605.         Advanced Techniques
  4606.         -------------------
  4607.            Door Source has several new features that are more program
  4608.         related, that are just a little bit to hard to put in the previous
  4609.         section, Getting more out of Door Source.
  4610.  
  4611.            The extra line status line
  4612.            --------------------------
  4613.            Normally, Door Source has lines 24 and 25 in use with its status
  4614.            line, but if you have some information of you're own that you'd
  4615.            like to put on it, now you can by using the GameInfoUpdate
  4616.            routine with the variable GameInfoCol.
  4617.            The only major change you have to make to your program is to use
  4618.            the DSGAME.INT file instead of the DOORSORC.INT file, and you'll
  4619.            need to write a routine to do the status line updating.
  4620.            First of all, the Door Source status line is moved up to lines
  4621.            23 and 24, and we leave 25 for your use. You call the
  4622.            GameInfoUpdate routine like you would call print, for example:
  4623.                 ' $INCLUDE:'DSGAME.INT'
  4624.                   .
  4625.                   .  (Later in the program)                         Background
  4626.                   .                                                     \/
  4627.                 CALL GameInfoUpdate("This is on the 25th line!", No, 14, 7)
  4628.                                      ^ Text                      ^   ^
  4629.                                                                  |   Foreground
  4630.                                                                  Enter
  4631.            The background is the last number, and the color you specify is
  4632.            the foreground color. The enter parameter is like the ; on a
  4633.            print command, telling it no keeps the current position at that
  4634.            spot, but yes will start at column 1 when you do the next
  4635.            GameInfoUpdate.
  4636.            But what if you want to position the cursor somewhere on the
  4637.            line without printing to that location? Or what if you want
  4638.            to know where the cursor is? You can tell both of these by
  4639.            looking at the GameInfoCol variable. For example:
  4640.                 A = GameInfoCol   ' A now contains the horizontal position
  4641.                                   ' of the cursor on line 25.
  4642.                 GameInfoCol = 30  ' With the next GameInfoUpdate call, it
  4643.                                   ' will start printing at column 30.
  4644.            Now the only thing missing is your interfacing this into your
  4645.            program. The easiest way to do this is to write a new ClrScrn
  4646.            routine, that you call in place of ClrScrn, this is necessary
  4647.            because ClrScrn doesn't update your line when called, so you'll
  4648.            have to do it. Here's an example of a new ClrScrn:
  4649.               SUB ClearTheScreen
  4650.                  CALL ClrScrn
  4651.                  CALL GameInfoUpdate("This is on the 25th line!",No,14,7)
  4652.               END SUB
  4653.  
  4654.   Door Source 4.0
  4655.   Programmer's Manual - Page 2
  4656.  
  4657.            Writing your own output routines
  4658.            --------------------------------
  4659.               With Door Source, you can virtually write your own output
  4660.            routines for use with your program. The kernel for all of our
  4661.            output routines is the Send1Line routine. It will send one
  4662.            line out to the local and remote display, and will decode the
  4663.            substitution codes too! All that's left for you to do is to
  4664.            write your own routine that calls this routine. For example,
  4665.            say you wanted to write a routine that would colorize all of the
  4666.            letters that are the capital A, then you might do this:
  4667.               SUB ColorizeTheA(Text$,AColor$,RegularColor$)
  4668.                  FOR X=1 TO LEN(Text$)
  4669.                     IF MID$(Text$,X,1)="A" THEN
  4670.                        CALL Send1Line(AColor$+MID$(Text$,X,1))
  4671.                     ELSE
  4672.                        CALL Send1Line(RegularColor$+MID$(Text$,X,1))
  4673.                     END IF
  4674.                  NEXT X
  4675.               END SUB
  4676.            The variables AColor$ and RegularColor$ would store the @X color
  4677.            codes for the colors for A's and other letters.
  4678.  
  4679.            Writing your own input routines
  4680.            -------------------------------
  4681.               You can write your own input routines too with Door Source.
  4682.            The main kernel for the input routine is CommInkey$, and a few
  4683.            other routines supplement the features offered in Incomm. An
  4684.            example input routine that is very simple might be:
  4685.               SUB GetInput
  4686.                  DO
  4687.                     A$=CommInkey$
  4688.                     IF A$="" THEN A$=INKEY$
  4689.                  LOOP UNTIL A$<>""
  4690.                  ARG$=A$
  4691.               END SUB
  4692.            You should also be aware that all filters, and special variables
  4693.            that affect input with Incomm do NOT work with CommInkey$, you
  4694.            have to program in support for them yourself if you want them.
  4695.            The GetInput routine above would wait for a key to be pressed
  4696.            on the local or remote keyboard. Now say that you want to echo
  4697.            the character to the screen and to the remote screen, you'd do
  4698.            this:
  4699.               SUB GetInput
  4700.                  DO
  4701.                     A$=CommInkey$
  4702.                     IF A$="" THEN A$=INKEY$
  4703.                  LOOP UNTIL A$<>""
  4704.                  ARG$=A$
  4705.                  CALL Send1Line(A$)   ' Echos the character
  4706.               END SUB
  4707.   Door Source 4.0
  4708.   Programmer's Manual - Page 2
  4709.  
  4710.            Now maybe you want to trap the function keys, you could do this:
  4711.               SUB GetInput
  4712.                  DO
  4713.                     A$=CommInkey$
  4714.                     IF A$="" THEN A$=INKEY$
  4715.                  LOOP UNTIL A$<>""
  4716.                  ARG$=A$
  4717.                  IF LEFT$(A$,1)=CHR$(0) THEN
  4718.                     CALL ExtendedCode(A$,NULL) ' Process the function key
  4719.                  ELSE
  4720.                     CALL Send1Line(A$)         ' Echos the character
  4721.                  END IF
  4722.               END SUB
  4723.            The NULL variable on the ExtendedCode is used only by Incomm,
  4724.            and you shouldn't pass anything to it in place of it, and its
  4725.            not used to return anything to your program. Now the GetInput
  4726.            routine we have above is pretty good. It will accept input
  4727.            from the keyboard and from remote, check for a extended code
  4728.            and process it, otherwise it will echo the character.
  4729.            You can also write your own chat routine, but use our code
  4730.            by calling Incomm with the second parameter as a 5. This
  4731.            will print the "Sysop started chat at" and the "Hello, this is"
  4732.            lines, and then will handle the input and color for you, then
  4733.            once the sysop presses ESC to end the chat, it will print the
  4734.            "Sysop ended chat at" and return control to you. So basically, by
  4735.            passing a 5 as the second parameter forces a chat.
  4736.               Example:
  4737.               CALL Incomm("",5,No,15)   ' Forces a chat
  4738.  
  4739.            Carrier loss processing
  4740.            ----------------------
  4741.               Sometimes in more complex doors, its necessary to process
  4742.            a carrier drop yourself in order to save and wrap up files.
  4743.            You could turn carrier checking off, but its best if you use
  4744.            the CarrierLossError method. What you do is set CarrierLossError
  4745.            to YES and when carrier is dropped, a error number 255 will be
  4746.            forced, and if you have a ON ERROR trapping processing in your
  4747.            program, you will be able to catch it, and then let Door Source
  4748.            finish off the rest. For an example, please refer to the example
  4749.            program ERRDEMO.BAS.
  4750.  
  4751.   Door Source 4.0
  4752.   Programmer's Manual - Page 2
  4753.  
  4754.         How a door works
  4755.         ----------------
  4756.            Understanding how a door works is good to know so that you can
  4757.         better plan your door. Here's a simple diagram on what happens:
  4758.  
  4759.                         BBS Creates the interface file and exits
  4760.                                          \|/
  4761.                                 Door's batch file is run
  4762.                                          \|/
  4763.              |-->      Door loads and reads in the interface file
  4764.              |                           \|/
  4765. Door Source  |      The door opens the communications port if needed
  4766. handles this |                           \|/
  4767. with your    |                 User interacts with the door
  4768. program      |                           \|/
  4769.              |-->  Door eventually exits, updating the interface file
  4770.                                          \|/
  4771.                        BBS reloads and reads in the interface file
  4772.                                          \|/
  4773.                               User continues using the bbs
  4774.  
  4775.         The DOORSORC.INT file sets up the necessary DECLAREs for the routines
  4776.         and the functions, it then sets up the COMMON SHARED block which lets
  4777.         you share variables with Door Source, like Baud&. Then it sets up
  4778.         a few constants, and then calls InitDoor, then the Door Source library
  4779.         takes over, and reads the configuration file, initialize its variables
  4780.         and then opens the com port for access. Then control is returned to
  4781.         you and your program picks up from their setting the program's name
  4782.         and version, etc,... While you're doing other processing, Door Source
  4783.         is ALWAYS looking at the com port, keeping received data in its
  4784.         buffer until you're ready for it. Door Source monitors everything
  4785.         for you, from carrier detection to characters being sent to
  4786.         characters being received, all behind the scenes.
  4787.  
  4788.   Door Source 4.0
  4789.   Programmer's Manual - Page 2
  4790.  
  4791.         Converting from Door Source 3.2 or before to 4.0
  4792.         ------------------------------------------------
  4793.            There are a few changes in how you call routines from 3.2 and
  4794.         before. Here's the list and how to change your program to fit 4.0
  4795.         without major restructuring. The easiest way to change things is
  4796.         using the QuickBasic search and replace feature from the edit menu.
  4797.  
  4798.          * Routine AllTrun is now a function, you use it like this:
  4799.                 A$ = AllTrun$(A$)
  4800.          * Routine HighScores has a extra parameter. The new third parameter
  4801.            lets you output its output to a already open file by passing the
  4802.            file number, but if you pass a 0, it outputs to the screen.
  4803.                 CALL HighScores(Score, ScoreDataFile$, OutputFileNumber)
  4804.          * Routine Windows has a few parameters changes, the text foreground
  4805.            and text background have been deleted since WindowPrint and
  4806.            WindowInput do all window processing. Windows in your program
  4807.            will need to be re-written because of this.
  4808.                 CALL Windows(ULR, ULC, LRR, LRC, Foreground, Background,
  4809.                         Border, Shadow)
  4810.          * Routine Windows has two new borders, they are:
  4811.                 3 - Double horizontal Single vertical
  4812.                 4 - Single horizontal Double vertical
  4813.  
  4814.          * Routine DayOfWeek moved into ScriptCMD.
  4815.                 I1$="DAYOFWEEK":CALL ScriptCMD
  4816.          * Routine MenuManager parameters have been changed, the Select$
  4817.            parameter has been deleted, since now ANSI.Select$ and
  4818.            NonANSI.Select$ (COMMON SHARED variables) are now used for the
  4819.            select string. BarForeground and BarBack have been added, they
  4820.            have the foreground and background color for the selection bar.
  4821.                 CALL MenuManager(Menu$(),Center,TextColor,NumberOfSelections,
  4822.                    BarForeground, BarBackground, BarnumberSelected)
  4823.          * Routine SysopPage now has an extra parameter, this extra one is
  4824.            used to return a variable in, not to pass one. It returns a 1 (YES)
  4825.            if the page was answered.
  4826.                 CALL SysopPage(Answered)
  4827.          * Routine ErrorLevelSet has been removed because of environment
  4828.            conflicts.
  4829.  
  4830.   Door Source 4.0
  4831.   Programmer's Manual - Page 2
  4832.  
  4833.         Summary of new features
  4834.         -----------------------
  4835.                 LOCAL command line switch added
  4836.                 NETWORK command line switch added
  4837.                 Up.Key$ and Down.Key$ variables added
  4838.                 SysopPage changed
  4839.                 PageSound.1, PageSound.2, and PageSound.3 added
  4840.                 Page.String$ added
  4841.                 F5 (Shell to DOS) added
  4842.                 F3 (Printer toggle) added
  4843.                 GameInfoUpdate routine added
  4844.                 GameInfoCol added
  4845.                 Table$ and Default.Table$ added
  4846.                 PromptIncomm routine added
  4847.                 No.Abort added
  4848.                 MenuManager changed
  4849.                 Parser changed
  4850.                 WindowPrint and WindowInput routines added
  4851.                 ExtendedCode routine added
  4852.                 Protected.Input$ added
  4853.                 BlockSend routine added
  4854.                 RainbowSend routine added
  4855.                 Windows routine changed
  4856.                 DayOfWeek routine moved into ScriptCMD
  4857.                 RandNum function fixed
  4858.                 EntryIncomm added
  4859.                 AllTrun routine changed into a function
  4860.                 CheckCarrier routine added
  4861.                 Baud& variable added
  4862.                 CarrierLossError added
  4863.                 Carrier.Check added
  4864.                 ChangeDTR, ChangeCTS, and ChangeRTS added
  4865.                 IRQ command line parameter added
  4866.                 ADDR command line parameter added
  4867.                 PS2 command line parameter added
  4868.                 HighScores changed
  4869.                 ALL ROUTINES optimized to run faster, and to be more compact
  4870.  
  4871.   Door Source 4.0
  4872.   Programmer's Manual - Page 2
  4873.  
  4874.         Appendix A - CALL Syntax
  4875.         ------------------------
  4876.  
  4877.         CALL QSend(Text$, Enter)
  4878.         CALL BackSpace(Text$)
  4879.         CALL ExtendedCode(Text$,NULL)
  4880.         CALL BeepSpeaker()
  4881.         CALL NL(Number.Of.Lines)
  4882.         CALL Send(Text$, Bell, Enter, Color.To.Use)
  4883.         CALL Incomm(Text$, Enter, Limit.Field, Color.To.Use)
  4884.         CALL ANSIMusic(Music$, Music)
  4885.         CALL GameInfoUpdate(Text$, Enter, Color.To.Use, Color.Background)
  4886.         CALL BackSpaceOver()
  4887.         CALL Center(Text$)
  4888.         CALL ClrScrn
  4889.         CALL ColorEasy(Text$, Color.To.Use, Enter)
  4890.         CALL DoorBusy()
  4891.         CALL ErrorLevelSet(Error.Level)
  4892.         CALL ExitDoor()
  4893.         CALL GetTime(Hours, Minutes, Seconds, SinceMid#)
  4894.         CALL HighScores(Score, Score.FileName$, OutputFileNumber)
  4895.         CALL MenuManager(Menu$(), Center, TextColor, Number.Of.Bars,
  4896.            Select.Color, BarForeground, BarBackground, BarSelected)
  4897.         CALL MoveCursor(X,Y)
  4898.         CALL Parser(SearchFor$, SearchIn$, Array$(), ErrCode)
  4899.         CALL ReadUsers(ErrCode)
  4900.         CALL ScriptCMD()
  4901.         CALL Sorter(Array$(), How.Many.Elements)
  4902.         CALL SysopPage(Answered)
  4903.         CALL TimeConvert(Hours, Minutes, New.Time$)
  4904.         CALL ViewFile(FileName$, Check.For.GFile, MorePrompts, EnterPrompt)
  4905.         CALL WaitASec(How.Many.Seconds.To.Wait)
  4906.         CALL Windows(ULR, ULC, LRR, LRC, Fore, Back, Border, Shadow)
  4907.         CALL WriteUsers(ErrCode)
  4908.         CALL BlockSend(Array$(), Center, Lines.To.Send)
  4909.         CALL WindowPrint(Text$, Row, Col, Fore, Back)
  4910.         CALL WindowInput(Text$, MaxLength, Row, Col, Fore, Back)
  4911.         CALL RainbowSend(Text$, Bell, Enter, Color.To.Use)
  4912.         CALL PromptIncomm(Text$, Default$, DefaultColor, LimitField,
  4913.            Color.To.Use)
  4914.         CALL EntryIncomm(Text$, LimitField, FieldColor, Color.To.Use)
  4915.         CALL ShellToDos(Shell.String$)
  4916.  
  4917.   Door Source 4.0
  4918.   Programmer's Manual - Page 2
  4919.  
  4920.         Appendix B - Optimizing your door
  4921.         ---------------------------------
  4922.            The best way to optimize a door program can be divided into two
  4923.         parts.
  4924.                 1) The first part is cleaning up your code. This would mean
  4925.                    elimination of most or all GOTOs and GOSUBs, elimination
  4926.                    of as many constants as possible, and elimination of
  4927.                    repetition in your code.
  4928.                 2) The second part is compiling from the command line.
  4929.                    QuickBasic compiles with some unneeded options when you
  4930.                    select the Make EXE command from the Run menu. You might
  4931.                    need the error trapping flag (/X) if you have a ON ERROR
  4932.                    statement in your program, and you might need the switch
  4933.                    for dynamic arrays (/AH) if you're using them. Here's a
  4934.                    sample compilation for a NON-STANDALONE program:
  4935.                       BC MYPROG;
  4936.                       LINK /EX MYPROG.BAS,MYPROG.EXE,,BRUN45.LIB+DOORSORC.LIB
  4937.  
  4938.                    For a STANDALONE program, use this:
  4939.                       BC MYPROG/O;
  4940.                       LINK /EX MYPROG.BAS,MYPROG.EXE,,BCOM45.LIB+DOORSORC.LIB
  4941.  
  4942.                    These parameters will compile the to the most compact
  4943.                    format. You can also use PKLITE to compress it more.
  4944.  
  4945.   Door Source 4.0
  4946.   Programmer's Manual - Page 2
  4947.  
  4948.         Appendix C - Common Questions
  4949.         -----------------------------
  4950.         Q: How do I read in additional information from the configuration
  4951.            file?
  4952.         A: To read in more information, simply INPUT from file #1 after you
  4953.            call ClrScrn for the first time. Make sure to close it when you're
  4954.            done. Here's an example:
  4955.               ' $INCLUDE:'DOORSORC.INT'
  4956.               PROGNAME$="Example"
  4957.               RELEASE$="1.0"
  4958.               CALL ClrScrn
  4959.               INPUT #1, ExtraInfo
  4960.               CLOSE #1
  4961.            Door Source doesn't read past the fourth line of the configuration
  4962.            file, so you can put whatever you please there.
  4963.         Q: How do I test a door from inside QuickBasic?
  4964.         A: You must have first loaded QuickBasic with the /L option specifying
  4965.            the Door Source library. For example:
  4966.               QB MYDOOR /L DOORSORC
  4967.            Then you will need to setup the command line parameters by setting
  4968.            the COMMAND$, you do this from the Run menu from Modify COMMAND$.
  4969.            Now, as long as your configuration file, bbs interface file, and
  4970.            all other files you need exist, you can press F5 and test your door
  4971.            from QuickBasic.
  4972.         Q: Should I compile as a stand-alone door?
  4973.         A: It's up to you. A stand-alone door will not need the BRUN45.EXE,
  4974.            but it will make your door significantly larger, and compiling
  4975.            not as a stand-alone will save space. Door Source will work fine
  4976.            either way.
  4977.         Q: What does the error "Error opening port -1" mean?
  4978.         A: It means that you have specified a invalid serial port, and you
  4979.            should check your bbs interface file or your bbs's setup.
  4980.  
  4981.   Door Source 4.0
  4982.   Programmer's Manual - Page 2
  4983.  
  4984.         Appendix D - Variable Reference
  4985.         -------------------------------
  4986.         The first part of this reference is of the global variables, the
  4987.         second is of the global UserBlock type declaration.
  4988.  
  4989.         Variable Name   Purpose
  4990.         -------------   ------------------------------------------------------
  4991.         ARG$            Input from user, returned by Incomm routine
  4992.         SYSDPATH$       Drive/Path/Filename of bbs interface file
  4993.         BBSName$        Name of BBS running on
  4994.         SysopNM$        Sysop FULL name
  4995.         CALLNAME$       Caller's FULL name
  4996.         Baud&           Baud rate of caller
  4997.         PROGNAME$       Name of your door
  4998.         RELEASE$        Version of your door
  4999.         ANSI            Ansi Flag  (1 = On  0 = Off)
  5000.         I1$,I2$,I3$     Input variables to script commands
  5001.         O1$,O2$,O3$     Output variables from script commands
  5002.         User.Color      Color that user input will be display in
  5003.         BackGroundColor Color to use for background when displaying
  5004.         Exit.Dor.1$     First line of ExitDoor message
  5005.         Exit.Dor.2$     Second line of ExitDoor message
  5006.         Exit.Dor.Clr1   Color of first line
  5007.         Exit.Dor.Clr2   Color of second line
  5008.         UserF$          First name of caller
  5009.         UserL$          Last name of caller
  5010.         Caps            Convert all input to caps (1 = Yes  0 = No)
  5011.         Page.Bell       Page bell toggle (-1 = On  0 = Off)
  5012.         Caller.Alarm    Caller alarm (-1 = On  0 = Off)
  5013.         Sysop.Next      Sysop next on toggle (-1 = On  0 = Off)
  5014.         Hang.Up         Exit to DOS after log off toggle (-1 = On  0 = Off)
  5015.         User.Record     Record number of user
  5016.         Network         Network active (1 = Yes  0 = No)
  5017.         Display.Toggle  Display on/off toggle (ignored by DS -1 = On  0 = Off)
  5018.         Printer.Toggle  Printer on/off (-1 = On  0 = Off)
  5019.         BusyFlag        A signal to ExitDoor that DoorBusy routine is in use
  5020.         UserFile$       Drive/Path/Filename of USERS file (PCBoard ONLY!)
  5021.         Up.Key$         Key to be used for scrolling up in MenuManager
  5022.         Down.Key$       Key to be used for scrolling down in MenuManager
  5023.         Parity          Parity of user calling (7 or 8 data bits)
  5024.         Filter          Incomm filtering active (filters all high ascii out)
  5025.         BusyFile$       Drive/Path/Filename of busy file for DoorBusy routine
  5026.         SysFirst$       Sysop's first name
  5027.         SysLast$        Sysop's last name
  5028.         CommPort        Communacations port being used (1-8)
  5029.         Last.Clr.Used   Last color used in a call to Send
  5030.         EchoKey         STOPS echoing keys to remote user (1 = Yes  0 = No)
  5031.         No.Enter.Send   Incomm doesn't send enter when done (1 = Yes  0 = No)
  5032.         File.Missing$   String ViewFile$ displays when file is not found
  5033.         BBSType$        Type of BBS in use (PCB14, PCB121, PCB122, WILDCAT,
  5034.                         RBBS, or DOORSYS)
  5035.   Door Source 4.0
  5036.   Programmer's Manual - Page 2
  5037.  
  5038.         Node            Node caller is on
  5039.         TabSpace        Send will tab to this column before sending
  5040.         InverseText     Reverses the text colors (Foreground/Background switch)
  5041.         Sysop           Sysop is on (1 = Yes  0 = No)
  5042.         BlinkText       Send will make text blink
  5043.         Not.Around$     String to show when Sysop doesn't answer page
  5044.         PARAM$          Extra command-line parameters that DS didn't use
  5045.         Page.String$    String to display while paging
  5046.         PageSound.1     First tone of page
  5047.         PageSound.2     Second tone of page
  5048.         PageSound.3     Third tone of page
  5049.         GameInfoCol     Column to start printing on game status line
  5050.         Default.Table$  Table containing a unaltered filter
  5051.         Table$          Specific filtering of characters for Incomm
  5052.         KeyBoardTimeOut Number of SECONDS for a keyboard time out
  5053.         Protected.Input$  Incomm displays this instead of what user types
  5054.         ANSI.Select$    Menu Manager's ANSI selection string
  5055.         NonAnsi.Select$ Menu Manager's NON-ANSI selection string
  5056.         Carrier.Check   Disables carrier checking (1 = Yes  0 = No)
  5057.         CarrierLossError  Causes ExitDoor to generate a error 255 if carrier
  5058.                           is dropped.
  5059.         No.Abort        Disables CTRL-X, CTRL-K keys from aborting screens
  5060.                         (1 = Yes  0 = No)
  5061.         AutoMore        Automatically prints more prompts/press any key prompts
  5062.         Lines.Since     Number of lines printed since last more/press prompt
  5063.         
  5064.  
  5065.   Door Source 4.0
  5066.   Programmer's Manual - Page 2
  5067.  
  5068.         This is the reference for the UserBlock global variable
  5069.  
  5070.   Variable                Type          P  W  R  D   Description
  5071.  -------------------     -----------    -  -  -  -   -------------------------
  5072.  CityState            AS STRING * 24    Y  Y  Y  Y   City and state of user
  5073.  Password             AS STRING * 12    Y  Y     Y   User's Password
  5074.  BusinessPhone        AS STRING * 13    Y        Y   User's Business/Data phone
  5075.  VoicePhone           AS STRING * 13    Y  Y     Y   User's Voice/Home phone
  5076.  LastDateOn           AS STRING * 20    Y  Y     Y   Last date user was on
  5077.  LastTimeOn           AS STRING * 5     Y            Last time user was on
  5078.  ExpertMode           AS STRING * 1     Y  Y     Y   Expert mode "Y" or "N"
  5079.  ProtocolType         AS STRING * 5     Y  Y     Y   Protocol selected
  5080.  LastDirListing       AS STRING * 10    Y  Y         Last date viewed dir
  5081.  SecurityLevel        AS INTEGER        Y  Y  Y  Y   Security Level for user
  5082.  TimesOn              AS INTEGER        Y  Y     Y   Number of times on before
  5083.  PageLength           AS INTEGER        Y  Y         Page length for user
  5084.  TotalUploads         AS INTEGER        Y  Y     Y   Total # of uploads made
  5085.  TotalDownloads       AS INTEGER        Y  Y     Y   Total # of downloads made
  5086.  DailyDownloadBytes   AS DOUBLE         Y            # of download bytes left
  5087.  UserComment          AS STRING * 30    Y            User Comment field
  5088.  SysopComment         AS STRING * 30    Y            Sysop Comment field
  5089.  ElapsedTime          AS INTEGER        Y  Y         Elapsed Time on system  1
  5090.  Subscription         AS STRING * 20    Y
  5091.  SubscriptionExpire   AS STRING * 20    Y
  5092.  AreaRegistration     AS STRING * 50    Y  Y     Y   Areas user has access to
  5093.  AreaExpire           AS STRING * 50    Y
  5094.  AreasToScan          AS STRING * 50    Y
  5095.  TotalDownloadBytes   AS DOUBLE         Y  Y     Y   Total bytes downloaded
  5096.  TotalUploadBytes     AS DOUBLE         Y            Total bytes uploaded
  5097.  DeleteFlag           AS STRING * 1     Y            Flag to delete user
  5098.  TimeEnteredDoor      AS STRING * 5     Y  Y  Y  Y   Time user entered door
  5099.  AreaFrom             AS INTEGER        Y        Y   Area user exited from
  5100.  MemorizedMessage     AS LONG           Y            Memorized message #
  5101.  TimeCalled           AS STRING * 5     Y  Y         Time user called bbs
  5102.  DailyDownloadTotal   AS INTEGER           Y         Total downloads TODAY
  5103.  MaxDownloadLimit     AS DOUBLE            Y         Max downloads TODAY
  5104.  LastRead             AS INTEGER           Y         Message last read
  5105.  MaxDownloadKLimit    AS DOUBLE         Y  Y     Y   Max d/l K TODAY
  5106.  ExpirationDate       AS STRING * 10             Y
  5107.  LR0                  AS STRING * 4     Y
  5108.  LR1                  AS STRING * 4     Y
  5109.  LR2                  AS STRING * 4     Y
  5110.       .
  5111.       .
  5112.  LR39                 AS STRING * 4     Y
  5113.  
  5114.  
  5115.   Door Source 4.0
  5116.   Programmer's Manual - Page 2
  5117.  
  5118.         Appendix E - Script Commands Reference
  5119.         --------------------------------------
  5120.         Script commands are several small routines packed all into one.
  5121.         In order to access them, you set the according variables, and
  5122.         then make a call to ScriptCMD routine. For example, if you
  5123.         wanted to display a Press [ANY KEY] to continue prompt, you
  5124.         could do this:
  5125.                 I1$ = "PRES"
  5126.                 CALL ScriptCMD
  5127.         Variables I1$, I2$, and I3$ are all INPUT variables that store
  5128.         information for the routine to use. O1$, O2$, and O3$ are all OUTPUT
  5129.         variables that return information from the routine to you.
  5130.         I1$ is always the name of the routine you're calling inside of
  5131.         ScriptCMD. You only have to specify the first 4 letters of the
  5132.         word unless stated in the documentation.
  5133.  
  5134.  
  5135.   Door Source 4.0
  5136.   Programmer's Manual - Page 2
  5137.  
  5138.         LTRIM
  5139.  
  5140.         Purpose: To trim all leading spaces
  5141.  
  5142.         Name in ScriptCMD: LTRIM
  5143.  
  5144.         Remarks: This routine is a simple truncation routine to remove
  5145.         all leading spaces from a string.
  5146.  
  5147.         Parameters Passed:
  5148.                 I2$ - The string to be truncated
  5149.  
  5150.         Parameters Returned:
  5151.                 O1$ - The truncated string
  5152.  
  5153.  
  5154.   Door Source 4.0
  5155.   Programmer's Manual - Page 2
  5156.  
  5157.         RTRIM
  5158.  
  5159.         Purpose: To trim all trailing spaces
  5160.  
  5161.         Name in ScriptCMD: RTRIM
  5162.  
  5163.         Remarks: This routine is a simple routine to truncate all trailing
  5164.         spaces from a string.
  5165.  
  5166.         Parameters Passed:
  5167.                 I2$ - The string to be truncated
  5168.  
  5169.         Parameters Returned:
  5170.                 O1$ - The truncated string
  5171.  
  5172.  
  5173.   Door Source 4.0
  5174.   Programmer's Manual - Page 2
  5175.  
  5176.         Upper Case
  5177.  
  5178.         Purpose: To convert a string to all upper case
  5179.  
  5180.         Name in ScriptCMD: UPPER
  5181.  
  5182.         Remarks: This routine will convert a string into all upper case
  5183.  
  5184.         Parameters Passed:
  5185.                 I2$ - The string to be converted
  5186.  
  5187.         Parameters Returned:
  5188.                 O1$ - The converted string
  5189.  
  5190.  
  5191.   Door Source 4.0
  5192.   Programmer's Manual - Page 2
  5193.  
  5194.         Lower case
  5195.  
  5196.         Purpose: To convert a string to all lower case
  5197.  
  5198.         Name in ScriptCMD: LOWER
  5199.  
  5200.         Remarks: This routine will convert a string into all lower case
  5201.  
  5202.         Parameters Passed:
  5203.                 I2$ - The string to be converted
  5204.  
  5205.         Parameters Returned:
  5206.                 O1$ - The converted string
  5207.  
  5208.  
  5209.   Door Source 4.0
  5210.   Programmer's Manual - Page 2
  5211.  
  5212.         More Prompt
  5213.  
  5214.         Purpose: To display a more prompt
  5215.  
  5216.         Name in ScriptCMD: MORE
  5217.  
  5218.         Remarks: This will display a more prompt and allow the user to
  5219.         select Yes to continue, No to abort, and C to go non-stop. It
  5220.         will return a Y (for yes), a N (for no), or a C (for non-stop)
  5221.         in O1$
  5222.  
  5223.         Parameters Passed: None
  5224.  
  5225.         Parameters Returned:
  5226.                 O1$ - Contains a Y, N, or C
  5227.  
  5228.  
  5229.   Door Source 4.0
  5230.   Programmer's Manual - Page 2
  5231.  
  5232.         Press Any Key
  5233.  
  5234.         Purpose: To display a Press [ANY KEY] to continue prompt
  5235.  
  5236.         Name inside ScriptCMD: PRESS
  5237.  
  5238.         Remarks: This will display a Press [ANY KEY] to continue prompt and
  5239.         then wait for the key to be pressed:
  5240.  
  5241.         Parameters Passed: None
  5242.  
  5243.         Parameters Returned: None
  5244.  
  5245.  
  5246.   Door Source 4.0
  5247.   Programmer's Manual - Page 2
  5248.  
  5249.         Exist
  5250.  
  5251.         Purpose: To check if a file exists
  5252.  
  5253.         Name inside ScriptCMD: EXIST
  5254.  
  5255.         Remarks: This will check for the existence of the file specified.
  5256.  
  5257.         Parameters Passed:
  5258.                 I2$ - Drive/Path/Location of file to check for
  5259.  
  5260.         Parameters Returned:
  5261.                 O1$ - If the file exists
  5262.                       (Y = Yes  N = No)
  5263.  
  5264.  
  5265.   Door Source 4.0
  5266.   Programmer's Manual - Page 2
  5267.  
  5268.         Name conversion
  5269.  
  5270.         Purpose: To convert a name into proper upper and lower case
  5271.  
  5272.         Name inside ScriptCMD: NAMECASE
  5273.  
  5274.         Remarks: This will take a name like "DR. JOHN DOE" and properly
  5275.         convert it into "Dr John Doe"
  5276.  
  5277.         Parameters Passed:
  5278.                 I2$ - The name to be converted
  5279.  
  5280.         Parameters Returned:
  5281.                 O1$ - The converted name
  5282.  
  5283.  
  5284.   Door Source 4.0
  5285.   Programmer's Manual - Page 2
  5286.  
  5287.         Coding and Decoding
  5288.  
  5289.         Purpose: To code and decode a string
  5290.  
  5291.         Name inside ScriptCMD: CODER
  5292.  
  5293.         Remarks: This is a simple coding routine that will resist causal
  5294.         attempts to break it. It will code and decode with the same password.
  5295.         The longer the password, the better the protection you will have.
  5296.         The password shouldn't have any high ASCII characters in it.
  5297.  
  5298.         Parameters Passed:
  5299.                 I2$ - String to be coded/decode
  5300.  
  5301.                 I3$ - Password to code/decode with
  5302.  
  5303.         Parameters Returned:
  5304.                 O1$ - The coded/decoded string
  5305.  
  5306.  
  5307.   Door Source 4.0
  5308.   Programmer's Manual - Page 2
  5309.  
  5310.         Reverse Bits
  5311.  
  5312.         Purpose: To reverse the bits in a string
  5313.  
  5314.         Name inside ScriptCMD: REVERSEBITS (MUST USE ENTIRE NAME!)
  5315.  
  5316.         Remarks: This will take all of the characters in a string and reverse
  5317.         it's bits. This is a simple, but easy to break coding routine. To
  5318.         unreverse the bits, just call the routine again.
  5319.  
  5320.         Parameters Passed:
  5321.                 I2$ - The string to bit reverse
  5322.  
  5323.         Parameters Returned:
  5324.                 O1$ - The bit reversed string
  5325.  
  5326.  
  5327.   Door Source 4.0
  5328.   Programmer's Manual - Page 2
  5329.  
  5330.         Reverse Characters
  5331.  
  5332.         Purpose: To reverse the order of characters in a string
  5333.  
  5334.         Name inside ScriptCMD: REVERSECHARS (MUST USE ENTIRE NAME!)
  5335.  
  5336.         Remarks: This changes the order of characters in a string so that
  5337.         the first is last, and the last is first, and so on throughout the
  5338.         entire string. To decode it, simply call the routine again.
  5339.  
  5340.         Parameters Passed:
  5341.                 I2$ - The string to be reversed
  5342.  
  5343.         Parameters Returned:
  5344.                 O1$ - The reversed string
  5345.  
  5346.  
  5347.   Door Source 4.0
  5348.   Programmer's Manual - Page 2
  5349.  
  5350.         Appendix F - Command Reference
  5351.         ------------------------------
  5352.  
  5353.         Each command is shown in a set format. The format is as follows:
  5354.  
  5355.         Name of routine
  5356.  
  5357.         Purpose: States the prupose of the routine
  5358.  
  5359.         Remarks: Tells you the general information on the routine and how
  5360.         to use it.
  5361.  
  5362.         Parameters Passed: Tells you what parameters to the routine and what
  5363.             they are for.
  5364.  
  5365.         Parameters Returned: Tells you what parameters are returned and what
  5366.             is in them.
  5367.  
  5368.         Example: A short little program showing the usage of the routine
  5369.  
  5370.         See Also: (on some routines) Gives you a reference to other routines
  5371.             that do nearly the same thing or that work with this routine.
  5372.         QSend
  5373.  
  5374.         Purpose: To send a string local and remote quickly without the
  5375.         extra bells and whistles of Send.
  5376.  
  5377.         Syntax: CALL QSend(Text$, Send.Enter)
  5378.  
  5379.         Remarks: QSend is a very basic sending routine that simply sends
  5380.         the given string to the local and remote screens. @X and other
  5381.         substitution codes are the only form of color control in the
  5382.         strings passed. Extra variables and parameters that affect Send
  5383.         don't affect QSend.
  5384.  
  5385.         Parameters Passed:
  5386.                 Text$ - The string to be sent
  5387.  
  5388.                 Send.Enter - Send a CR/LF after sending is complete
  5389.                              (1 = Yes  0 = No)
  5390.  
  5391.         Parameters Returned: None
  5392.  
  5393.         Example:
  5394.                 Text$ = "This will be displayed in the last color used."
  5395.                 CALL QSend(Text$, Yes)
  5396.  
  5397.         See Also: BlockSend, ColorEasy, RainbowSend, Send, QSend
  5398.  
  5399.  
  5400.         CommKeyInkey$
  5401.  
  5402.         Purpose: To get one character from the local or remote keyboard
  5403.  
  5404.         Syntax: Character$ = CommKeyInkey$
  5405.  
  5406.         Remarks: This will check the local keyboard and the com port buffer
  5407.         for keys waiting to be read, if one is found, it will read it and
  5408.         return it, otherwise it will return a null. If you want to wait for
  5409.         a key to be pressed, you should put this routine in a WHILE loop.
  5410.  
  5411.         Parameters Passed: None
  5412.  
  5413.         Parameters Returned:
  5414.                 Character$ - Either null (if no key was pressed local or
  5415.                              remote) or a key from the keyboard or com port
  5416.                              buffer.
  5417.  
  5418.         Example:
  5419.                 DO
  5420.                    Character$ = CommKeyInkey$
  5421.                 LOOP UNTIL Character$ <> ""
  5422.  
  5423.         See Also: Incomm, CommInkey$
  5424.  
  5425.  
  5426.         FileOpen
  5427.  
  5428.         Purpose: To aid in opening files in a better, easier way
  5429.  
  5430.         Syntax: FileNumber = FileOpen(FileName$, Access$, Sharing, Length)
  5431.  
  5432.         Remarks: When you want to open a file and you don't know what the
  5433.         next available file number is, or you don't want to refer to files
  5434.         by their number, or if you don't want to have to fool with checking
  5435.         if a network is active every time a file is opened, this routine
  5436.         is what you should call. It will find the next available file number
  5437.         and open the file according to your specifications and return the
  5438.         file number to you in a variable so you can use it in place of a
  5439.         number.
  5440.  
  5441.         Parameters Passed:
  5442.                 FileName$ - This is the name of the file to be opened
  5443.                 Access$ - The method in which you want to open the file
  5444.                           for access.
  5445.                                 I - Sequential Input
  5446.                                 O - Sequential Output
  5447.                                 A - Append (Write at end of file)
  5448.                                 R - Random Read/Write
  5449.                                 B - Binary Read/Write
  5450.                 Sharing - Will open files to be shared if specified and a
  5451.                           network is active
  5452.                           (1 = Yes  0 = No)
  5453.                 Length - For random and binary files only, this will open
  5454.                          the file with this as the record length.
  5455.  
  5456.         Parameters Returned:
  5457.                 FileNumber - This is the variable you'd use for I/O with the
  5458.                              file. It will contain a -1 if the file wasn't
  5459.                              found that you tried to open only if you're
  5460.                              trying to do sequential input.
  5461.  
  5462.         Example:
  5463.                 FileNumber = FileOpen("MYFILE.FIL", "O", Yes, 0)
  5464.                 PRINT #FileNumber, "This is in the file"
  5465.                 CLOSE #FileNumber
  5466.  
  5467.                 FileNumber = FileOpen("MYFILE.FIL", "I", Yes, 0)
  5468.                 INPUT #FileNumber, DataFromFile$
  5469.                 CLOSE #FileNumber
  5470.  
  5471.  
  5472.         CheckTimeLeft
  5473.  
  5474.         Purpose: To tell you how many minutes a user has left on the system
  5475.  
  5476.         Syntax: TimeRemaining = CheckTimeLeft
  5477.  
  5478.         Remarks: This function will return the number of minutes that the user
  5479.         currently on has left for this call. Be careful not to assign the
  5480.         value returned to a variable named TimeLeft because doing so will
  5481.         modify Door Source's variable and cause the user's time to go berserk!
  5482.  
  5483.         Parameters Passed: None
  5484.  
  5485.         Parameters Returned:
  5486.                 TimeRemaining - The number of minutes left the user has
  5487.  
  5488.         Example:
  5489.                 CALL Send("("+STR$(CheckTimeLeft)+" min. left )", No, No, 14)
  5490.  
  5491.         See Also: AdjustTimeLimit
  5492.  
  5493.  
  5494.         BackSpace
  5495.  
  5496.         Purpose: To backspace on the local and remote screen and also erase
  5497.         the proper character in the string passed
  5498.  
  5499.         Syntax: CALL BackSpace(Text$)
  5500.  
  5501.         Remarks: This will allow you to write your own input routines for
  5502.         use, and when a user presses the backspace key, call this routine and
  5503.         it will send the proper backspacing codes and erase the backspaced
  5504.         character from the string passed.
  5505.  
  5506.         Parameters Passed:
  5507.                 Text$ - A string that will the backspace will be preformed on
  5508.  
  5509.         Parameters Returned:
  5510.                 Text$ - The new string with the last character erased
  5511.  
  5512.         Example:
  5513.                 IF KeyPressed$ = CHR$(8) THEN
  5514.                    CALL BackSpace(Text$)
  5515.                 END IF
  5516.  
  5517.  
  5518.         ExtendedCode
  5519.  
  5520.         Purpose: To let you trap F-keys in your own I/O routines
  5521.  
  5522.         Syntax: CALL ExtendedCode(CodeToProcess$, NULL)
  5523.  
  5524.         Remarks: If you are writing your own version of Incomm, and would
  5525.         like to take advantage of Door Source's F-Key processing routines,
  5526.         call this with the key pressed and it will take the necessary
  5527.         action, which may be updating the status bar or shelling to DOS.
  5528.  
  5529.         Parameters Passed:
  5530.                 CodeToProcess$ - The two character code of the key pressed
  5531.  
  5532.                 NULL - This variable shouldn't be used by your routine, it
  5533.                 is only used by Door Source and is specified only to maintain
  5534.                 compatibility.
  5535.  
  5536.         Parameters Returned: None
  5537.  
  5538.         Example:
  5539.                 A$ = INKEY$
  5540.                 IF LEN(A$)>1 THEN               ' Extended code
  5541.                    CALL ExtendedCode(A$, NULL)
  5542.                 END IF
  5543.  
  5544.  
  5545.         BeepSpeaker
  5546.  
  5547.         Purpose: To sound the local and remote speaker
  5548.  
  5549.         Syntax: CALL BeepSpeaker
  5550.  
  5551.         Remarks: Calling BeepSpeaker instead of sending a bell code to the
  5552.         screen and com port is better since it will always beep the remote
  5553.         speaker but won't make the local speaker sound unless the page bell
  5554.         is on.
  5555.  
  5556.         Parameters Passed: None
  5557.  
  5558.         Parameters Returned: None
  5559.  
  5560.         Example:
  5561.                 CALL BeepSpeaker
  5562.  
  5563.  
  5564.         NL
  5565.  
  5566.         Purpose: To send the specified number of times a CR/LF sequence
  5567.  
  5568.         Syntax: CALL NL(Number.Of.Times)
  5569.  
  5570.         Remarks: This will send a CR/LF sequence the number of times you
  5571.         tell it to. This is base routine for all routines to advance to
  5572.         the next line.
  5573.  
  5574.         Parameters Passed:
  5575.                 Number.Of.Times - The number of times to display the CR/LF
  5576.                                   sequence.
  5577.  
  5578.         Parameters Returned: None
  5579.  
  5580.         Example:
  5581.                 CALL NL(3)              ' Print 3 CR/LF sequences
  5582.  
  5583.         See Also: Send
  5584.  
  5585.  
  5586.         Send
  5587.  
  5588.         Purpose: To display a string to local and remote screens
  5589.  
  5590.         Syntax: CALL Send(Text$, Send.Bell, Send.Enter, Color.To.Use)
  5591.  
  5592.         Remarks: This is the basic sending routine and it will display
  5593.         to the local and remote screens. This routine will accept @X codes
  5594.         and other substitution codes and display the proper things in
  5595.         response to it. A few variables affect this routine's output, here's
  5596.         a list:
  5597.                 BackGroundColor - Background color to be used
  5598.  
  5599.                 TabSpace - The text will be tabbed to this column for display
  5600.  
  5601.         Parameters Passed:
  5602.                 Text$ - The string to be displayed
  5603.  
  5604.                 Send.Bell - Will sound the speaker on the remote and will
  5605.                             also sound the local ONLY if the page bell is on.
  5606.                             (1 = Yes  0 = No)
  5607.  
  5608.                 Send.Enter - Send a CR/LF sequence once displaying is done
  5609.                              (1 = Yes  0 = No)
  5610.  
  5611.                 Color.To.Use - Foreground color to display in
  5612.  
  5613.         Parameters Returned: None
  5614.  
  5615.         Example:
  5616.                 Text$ = "This will be displayed!"
  5617.                 CALL Send(Text$, No, Yes, 10)
  5618.  
  5619.         See Also: BlockSend, ColorEasy, RainbowSend, QSend, WindowPrint
  5620.  
  5621.  
  5622.         Incomm
  5623.  
  5624.         Purpose: To receive data from the keyboard and com port
  5625.  
  5626.         Syntax: CALL Incomm(Text$, Send.Enter, Max.Characters, Color.To.Use)
  5627.  
  5628.         Remarks: This is the basic input routine, it will check the keyboard
  5629.         and the remote keyboard for input. There are several variables that
  5630.         affect input for this routine, and they are all listed here:
  5631.                 Protected.Input$ - Incomm will show this character in place of
  5632.                                    what is really typed. Setting this to ""
  5633.                                    will cause normal display of input
  5634.  
  5635.                 TabSpace - The string to be displayed will be tabbed to this
  5636.                            column
  5637.  
  5638.                 User.Color - The user's input will be displayed in this color
  5639.  
  5640.                 Caps - Incomm will covert input to all caps before returning
  5641.                        (1 = Yes  0 = No)
  5642.  
  5643.                 No.Enter.Send - After input is completed, a CR/LF won't be
  5644.                                 sent (1 = Yes  0 = No)
  5645.  
  5646.                 EchoKey - Will make input not show up on the screens at all
  5647.                           (1 = Yes  0 = No)
  5648.  
  5649.                 Filter - This will filter out high ascii characters (128+)
  5650.                          (1 = Yes  0 = No)
  5651.  
  5652.                 Table$ - Set this to the only keys you want to be accepted
  5653.                          if you want to limit the user to a few keys. Set it
  5654.                          to Default.Table$ to restore it to normal.
  5655.  
  5656.                 BackGroundColor - This is the background color for the
  5657.                                   prompt and input.
  5658.  
  5659.         Parameters Passed:
  5660.                 Text$ - String to be sent as a prompt
  5661.  
  5662.                 Send.Enter - Send a CR/LF AFTER the prompt and BEFORE input
  5663.                              (1 = Yes  0 = No)
  5664.  
  5665.                 Max.Characters - The maximum number of character to accept
  5666.                                  Setting this to a -1 (or Hockey) will make
  5667.                                  Incomm take the first character it gets and
  5668.                                  not wait for ENTER to be pressed before
  5669.                                  returning.
  5670.                                  (0 = No limit  -1 = Hockey  < 1 = Limit)
  5671.  
  5672.                 Color.To.Use - Foreground color of prompt
  5673.  
  5674.         Parameters Returned:
  5675.                 ARG$ - The input received
  5676.  
  5677.         Example:
  5678.                 ' You don't need to reset all of these variables each
  5679.                 ' time you call incomm, they are show here just so you
  5680.                 ' can see how they work.
  5681.                 Caps = Yes                      ' Turn input to all caps
  5682.                 Protected.Input$ = "*"          ' Show * instead of letters
  5683.                 Table$="ABCDEFGHIJKLMNOPQRSTUVWXYZ"  ' Only accept A-Z
  5684.                 Text$="Enter your name:"
  5685.                 CALL Incomm(Text$, No, No, 10)
  5686.                 Protected.Input$ = ""           ' Show what is typed
  5687.                 CALL Incomm(Text$, No, 25, 10)  ' Limit to 25 characters
  5688.  
  5689.  
  5690.         See Also: CommInkey$
  5691.  
  5692.  
  5693.         AllTrun$
  5694.  
  5695.         Purpose: To truncate all leading and trailing spaces from a string
  5696.  
  5697.         Syntax: Text$ = AllTrun$(Text$)
  5698.  
  5699.         Remarks: This will remove all of those leading and trailing spaces
  5700.         that are a result of random file input, use of STR$, and other
  5701.         functions of BASIC.
  5702.  
  5703.         Parameters Passed:
  5704.                 Text$ - The string to remove leading and trailing spaces from
  5705.  
  5706.         Parameters Returned:
  5707.                 Text$ - The string without leading and trailing spaces
  5708.  
  5709.         Example:
  5710.                 Text$ = "   These extra spaces will be removed   "
  5711.                 Text$ = AllTrun$(Text$)
  5712.  
  5713.  
  5714.         ANSIMusic
  5715.  
  5716.         Purpose: To play ANSI music to those users who can use it
  5717.  
  5718.         Syntax: CALL ANSIMusic(Music$, Music)
  5719.  
  5720.         Remarks: Some communacations programs can support and play ANSI music
  5721.         but not all of them. Qmodem, for example, will play ANSI music. You
  5722.         should ask your users near the beginning of the program "Do you have
  5723.         ANSI music?" and if they answer yes, then set Music to Yes (1)
  5724.         otherwise set it to No (0). You don't have to use Music, but whatever
  5725.         variable you store that value in should always be the second parameter
  5726.         of the call to this routine. The music string can be anything that
  5727.         the BASIC command PLAY would be able to play. The local speaker
  5728.         won't play the music unless the page bell is on.
  5729.  
  5730.         Parameters Passed:
  5731.                 Music$ - The music to be played
  5732.  
  5733.                 Music - If the user supports ANSI music or not
  5734.                         (1 = Yes  0 = No)
  5735.  
  5736.         Parameters Returned: None
  5737.  
  5738.         Example:
  5739.                 Music = Yes
  5740.                 Music$ = "ABCDEFG"
  5741.                 CALL ANSIMusic(Music$, Music)
  5742.  
  5743.  
  5744.         GameInfoUpdate
  5745.  
  5746.         Purpose: To write to the 25 line of the game line of the status line
  5747.  
  5748.         Syntax: CALL GameInfoUpdate(Text$, Send.Enter, ColorFore, ColorBack)
  5749.  
  5750.         Remarks: If you want a game status line, you should use this routine
  5751.         to update line 25 (which will be the game status line). It works
  5752.         just like the PRINT command would work with a few differences.
  5753.         The Send.Enter really doesn't advance to the next line, but resets
  5754.         the column pointer (GameInfoCol) to 1. If you want to start printing
  5755.         someplace other than where you are, just set GameInfoCol to the
  5756.         column number. See the Advanced Programming section for a detailed
  5757.         explanation of how this command works.
  5758.  
  5759.         WARNING: You HAVE to use the DSGAME.INT in your main module instead
  5760.         of DOORSORC.INT otherwise this routine will not work!
  5761.  
  5762.         Parameters Passed:
  5763.                 Text$ - String to be displayed on line 25
  5764.  
  5765.                 Send.Enter - Reset GameInfoCol to 1 after displaying
  5766.                              (1 = Yes  0 = No)
  5767.  
  5768.                 ColorFore - Foreground color to use
  5769.  
  5770.                 ColorBack - Background color to use
  5771.  
  5772.         Parameters Returned: None
  5773.  
  5774.         Example:
  5775.                 Text$ = "This is on the game status line!"
  5776.                 CALL GameInfoUpdate(Text$, No, 0, 7)
  5777.  
  5778.  
  5779.         BackSpaceOver
  5780.  
  5781.         Purpose: To erase what is already on a line
  5782.  
  5783.         Syntax: CALL BackSpaceOver
  5784.  
  5785.         Remarks: This routine will backspace over everything to column 1,
  5786.         erasing everything on that line. If you have a prompt that you'd
  5787.         like to erase or something, this is the routine to call to erase
  5788.         it.
  5789.  
  5790.         Parameters Passed: None
  5791.  
  5792.         Parameters Returned: None
  5793.  
  5794.         Example:
  5795.                 CALL BackSpaceOver
  5796.  
  5797.         See Also: BackSpaceToCol
  5798.  
  5799.  
  5800.         Center
  5801.  
  5802.         Purpose: To aid in centering strings for output
  5803.  
  5804.         Syntax: CALL Center(Text$)
  5805.  
  5806.         Remarks: This will strip out all @X codes and substitute in the
  5807.         proper text for substitution codes and will then set TabSpace to
  5808.         equal the correct column to make the string look centered. The
  5809.         string that you pass is NOT modified by this routine. This routine
  5810.         also will NOT print out the results but only set TabSpace.
  5811.  
  5812.         Parameters Passed:
  5813.                 Text$ - The string to be centered
  5814.  
  5815.         Parameters Returned: None
  5816.  
  5817.         Example:
  5818.                 Text$ = "This will be centered!"
  5819.                 CALL Center(Text$)
  5820.                 CALL Send(Text$, No, Yes, 10)
  5821.  
  5822.  
  5823.         ClrScrn
  5824.  
  5825.         Purpose: To clear the local and remote screens
  5826.  
  5827.         Syntax: CALL ClrScrn
  5828.  
  5829.         Remarks: This will effectively clear the screen for both sides
  5830.         using the fastest method that the caller can use. Setting
  5831.         BackGroundColor previous to calling this routine will cause the
  5832.         entire screen to be that color!
  5833.  
  5834.         Parameters Passed: None
  5835.  
  5836.         Parameters Returned: None
  5837.  
  5838.         Example:
  5839.                 CALL ClrScrn
  5840.  
  5841.  
  5842.         ColorEasy
  5843.  
  5844.         Purpose: To colorize a string and output it
  5845.  
  5846.         Syntax: CALL ColorEasy(Text$, Color.To.Use, Send.Enter)
  5847.  
  5848.         Remarks: If you have a string that you'd like to colorize without
  5849.         having to bother with multiple calls to Send or with @X codes, then
  5850.         use this routine. It will colorize A-Z, a-z, 0-9, and punctuation
  5851.         all in different colors. The Color.To.Use that you specify will
  5852.         affect the output of color over the whole text, experiment with
  5853.         different values to best fit what you need.
  5854.  
  5855.         Parameters Passed:
  5856.                 Text$ - The string to be colorized and displayed
  5857.  
  5858.                 Color.To.Use - This will vary the output for the different
  5859.                                colors used in coloring the text
  5860.  
  5861.                 Send.Enter - Send a CR/LF sequence once displaying is finished
  5862.  
  5863.         Parameters Returned: None
  5864.  
  5865.         Example:
  5866.                 Text$ = "This will be VERY colorful!!"
  5867.                 CALL ColorEasy(Text$, 10, Yes)
  5868.  
  5869.         See Also: BlockSend, RainbowSend, Send, QSend
  5870.  
  5871.  
  5872.         DayOfWeek
  5873.  
  5874.         Purpose: To calculate the which day of the week it is
  5875.  
  5876.         Syntax: Day = DayOfWeek
  5877.  
  5878.         Remarks: This routine will return a value from 1 to 7 indicating
  5879.         which day of the week it is. A 1 is Sunday, 2 is Monday, and so on.
  5880.  
  5881.         Parameters Passed: None
  5882.  
  5883.         Parameters Returned:
  5884.                 Day - A number from 1-7 representing the day of the week
  5885.  
  5886.         Example:
  5887.                 IF DayOfWeek = 1 THEN
  5888.                    CALL Send("It's SUNDAY!", No, Yes, 14)
  5889.                 ELSE
  5890.                    CALL Send("It's not sunday!", No, Yes, 10)
  5891.                 END IF
  5892.  
  5893.  
  5894.         DoorBusy
  5895.  
  5896.         Purpose: To keep a door from being used by two nodes at once
  5897.  
  5898.         Syntax: CALL DoorBusy
  5899.  
  5900.         Remarks: If you aren't going to program multi-node support, call
  5901.         this routine so that multinode systems won't have problems running
  5902.         your door. You have to set the global variable BusyFile$ to the
  5903.         drive/path/filename of a "lockout file" that will be the signal
  5904.         to other nodes that the door is in use. If another node is using your
  5905.         door, then this routine will call DoorBusy and not return control
  5906.         to your program.
  5907.  
  5908.         Parameters Passed: None
  5909.  
  5910.         Parameters Returned: None
  5911.  
  5912.         Example:
  5913.                 BusyFile$ = "MYDOOR.NET"
  5914.                 CALL DoorBusy
  5915.  
  5916.  
  5917.         ExitDoor
  5918.  
  5919.         Purpose: To close the com port and update the bbs interface file
  5920.  
  5921.         Syntax: CALL ExitDoor
  5922.  
  5923.         Remarks: Whenever you want to end your door, you MUST call this
  5924.         routine. NEVER let your door simply just come to an end or have the
  5925.         END or SYSTEM command in it. This routine will uphold the DTR and
  5926.         cleanup Door Source's variables, handlers, etc,... It will also
  5927.         update the bbs interface file with the current information. After
  5928.         calling this routine, control will not be returned to your door.
  5929.  
  5930.         Parameters Passed: None
  5931.  
  5932.         Parameters Returned: None
  5933.  
  5934.         Example:
  5935.                 CALL ExitDoor
  5936.  
  5937.  
  5938.         FileExist
  5939.  
  5940.         Purpose: To detect is a file exists on a disk
  5941.  
  5942.         Syntax: Exists = FileExist(FileName$)
  5943.  
  5944.         Remarks: If you're opening files or preforming something with files
  5945.         you should check, before attempting use, if they exist and not assume
  5946.         that they are there, otherwise your program will generate a error
  5947.         and most likely crash the board it was running on.
  5948.  
  5949.         Parameters Passed:
  5950.                 FileName$ - Drive/Path/Filename to the file to be checked for
  5951.  
  5952.         Parameters Returned:
  5953.                 Exists - If the file exists or not
  5954.                          (-1 = Yes  0 = No)
  5955.  
  5956.         Example:
  5957.                 IF FileExist("MYFILE.FIL") THEN
  5958.                    CALL Send("It exists!", No, Yes, 12)
  5959.                 END IF
  5960.  
  5961.  
  5962.         GetTime
  5963.  
  5964.         Purpose: To separate the time into hours, minutes, and seconds
  5965.  
  5966.         Syntax: CALL GetTime(Hours, Minutes, Seconds, SinceMid#)
  5967.  
  5968.         Remarks: This will take the current time and return it to you
  5969.         in a separated form.
  5970.  
  5971.         Parameters Passed: None
  5972.  
  5973.         Parameters Returned:
  5974.                 Hours - The hour
  5975.  
  5976.                 Minutes - The minute
  5977.  
  5978.                 Seconds - The second
  5979.  
  5980.                 SinceMid# - The number of seconds since midnight
  5981.  
  5982.         Example:
  5983.                 CALL GetTime(Hours, Minutes, Seconds, SinceMid#)
  5984.                 CALL Send("Its "+STR$(Hours)+" o'clock", No, Yes, 10)
  5985.  
  5986.         See Also: TimeConvert
  5987.  
  5988.  
  5989.         HighScores
  5990.  
  5991.         Purpose: To make a high score bulletin
  5992.  
  5993.         Syntax: CALL HighScores(Score, HighScoreFile$, OutputNumber)
  5994.  
  5995.         Remarks: This will take the user's score and use the high score data
  5996.         file specified, update the information, and then either display a
  5997.         bulletin or save it to disk. The high score data file, if
  5998.         non-existent will be created, its a random access file and can't
  5999.         be read/modified in a text editor. Compression can be done with the
  6000.         compression utility included with the Door Source archive. You
  6001.         will need to open the file for output before calling this routine
  6002.         if you want to direct the output to a file, this also allows you
  6003.         to create a header (on screen or in the file) for your bulletin.
  6004.         The format of where HighScores places the information is like this:
  6005.  
  6006. <--21 spaces-------->(NAME OF USER)<---29 spaces--->(SCORE)
  6007.                      John Doe                       100
  6008.                      Jane Doe                       50
  6009.  
  6010.         Parameters Passed:
  6011.                 Score - Score for user
  6012.  
  6013.                 HighScoreFile$ - Name of the random access data file
  6014.                                  that HighScores creates
  6015.  
  6016.                 OutputNumber - The filenumber that output should go to, if
  6017.                                0 then output goes to screen
  6018.  
  6019.         Parameters Returned: None
  6020.  
  6021.         Example:
  6022.                 ScoreDataFile$ = "MYSCORE.SCO"
  6023.                 Score = 569
  6024.                 ScoreBlt = 1
  6025.                 OPEN "SCORES.BLT" FOR OUTPUT AS #1
  6026.                 CALL HighScores(Score, ScoreDataFile$, ScoreBlt)
  6027.  
  6028.  
  6029.         MenuManager
  6030.  
  6031.         Purpose: To make a scroll bar menu
  6032.  
  6033.         Syntax: CALL MenuManager(Menu$(), Center, TextClr, Bars, SlctClr,
  6034.                 BarFore, BarBack, BarSelected)
  6035.  
  6036.         Remarks: This will create a nice selectable menu with a scroll bar
  6037.         for ANSI users to scroll up and down. Non-ANSI users will see the
  6038.         menu, but will be forced to just enter a number and will have no
  6039.         scroll bar. You shouldn't have more than 20 selections on the menu,
  6040.         and all should be numbered. This routine is affected by several
  6041.         variables which are:
  6042.                 Up.Key$ - The key to move the bar up
  6043.                           (Default to +)
  6044.  
  6045.                 Down.Key$ - The key to move the bar down
  6046.                             (Default to -)
  6047.  
  6048.                 ANSI.Select$ - Selection string displayed for ANSI users
  6049.  
  6050.                 NonANSI.Select$ - Selection string displayed for NON-ANSI users
  6051.  
  6052.         Parameters Passed:
  6053.                 Menu$() - An array with all the menu selections in it
  6054.  
  6055.                 Center - Center the selections while displaying
  6056.  
  6057.                 TextClr - Color for selections
  6058.  
  6059.                 Bars - Number of selections in array
  6060.  
  6061.                 SlctClr - Color for ANSI.Select$ or NonANSI.Select$ string
  6062.  
  6063.                 BarFore - Foreground color for scroll bar
  6064.  
  6065.                 BarBack - Background color for scroll bar
  6066.  
  6067.         Parameters Returned:
  6068.                 BarSelected - The bar selected by the user
  6069.  
  6070.         Example:
  6071.                 See MENUDEMO.BAS included with Door Source
  6072.  
  6073.  
  6074.         MoveCursor
  6075.  
  6076.         Purpose: To position the cursor on the screen
  6077.  
  6078.         Syntax: CALL MoveCursor(X, Y)
  6079.  
  6080.         Remarks: Call this routine to position the cursor anywhere on the
  6081.         screen in the upper 22/23 lines (depending on if there is a game
  6082.         status line). This routine will not move the cursor if the user is
  6083.         not in ANSI mode.
  6084.  
  6085.         Parameters Passed:
  6086.                 X - The row (vertical)
  6087.  
  6088.                 Y - The column (horizontal)
  6089.  
  6090.         Parameters Returned: None
  6091.  
  6092.         Example:
  6093.                 CALL MoveCursor(10, 10)
  6094.  
  6095.  
  6096.         Parser
  6097.  
  6098.         Purpose: To separate data in a string with a delimiter
  6099.  
  6100.         Syntax: CALL Parser(SearchFor$, SearchIn$, ParArray$(), ErrCode)
  6101.  
  6102.         Remarks: This will take a string and look for the character specified
  6103.         and store the data in the array, it then repeats this process over
  6104.         and over until the end of the string has been reached. This can be
  6105.         handy to store numbers in a compact form for storage in a file.
  6106.  
  6107.         Parameters Passed:
  6108.                 SearchFor$ - The string (delimiter) to search for
  6109.  
  6110.                 SearchIn$ - The string to search in and to parse
  6111.  
  6112.         Parameters Returned:
  6113.                 ParArray$() - Contains the data from SearchIn$ but separated
  6114.  
  6115.                 ErrCode - Will greater than 1 is a error occurred
  6116.  
  6117.         Example:
  6118.                 SearchFor$ = "*"
  6119.                 SearchIn$ = "100*200*300*400*500*"
  6120.                 CALL Parser(SearchFor$, SearchIn$, ParArray$(), ErrCode)
  6121.                 FOR X = 1 TO 5
  6122.                    CALL Send(ParArray$(X), No, Yes, 10)
  6123.                 NEXT
  6124.                 ' This would output:
  6125.                 ' 100
  6126.                 ' 200
  6127.                 ' 300
  6128.                 ' 400
  6129.                 ' 500
  6130.  
  6131.  
  6132.         RandNum
  6133.  
  6134.         Purpose: To generate a random number within a specified range
  6135.  
  6136.         Syntax: Number = RandNum(Low, High)
  6137.  
  6138.         Remarks: This is handy to generate a random number in the range
  6139.         that you need it. It will generate a completely random number.
  6140.  
  6141.         Parameters Passed:
  6142.                 Low - The lowest number desired
  6143.  
  6144.                 High - The highest number desired
  6145.  
  6146.         Parameters Returned:
  6147.                 Number - The random number generated
  6148.  
  6149.         Example:
  6150.                 CALL Send("The number is "+STR$(RandNum(10,20)), No, Yes, 10)
  6151.  
  6152.  
  6153.         ReadUsers
  6154.  
  6155.         Purpose: To read from the PCBoard 14.x users file
  6156.  
  6157.         Syntax: CALL ReadUsers(ErrCode)
  6158.  
  6159.         Remarks: This will read the user's record from the PCBoard user file
  6160.         specified in the global variable UserFile$. The data will be read into
  6161.         the global type declaration UserBlock (Which is shown in Appendix D -
  6162.         Variable Reference). For other bbs types, most of the data is loaded
  6163.         directly from the bbs interface file, and calling a routine to read
  6164.         the users file is not necessary. The best way to set UserFile$ is
  6165.         to add on another line to the configuration file and read it in
  6166.         yourself after the first call to ClrScrn.
  6167.  
  6168.         Parameters Passed: None
  6169.  
  6170.         Parameters Returned:
  6171.                 ErrCode - This is the error code is a error occurred
  6172.                           1 - Users file not found
  6173.                           2 - Wrong BBS type
  6174.                           3 - UserFile$ not set to Drive/Path/Filename of users
  6175.                               file
  6176.  
  6177.         Example:
  6178.                 See BLCKDEMO.BAS
  6179.  
  6180.                 ' UserFile$ already set earlier in the program
  6181.                 CALL ReadUsers(ErrCode)
  6182.                 CALL Send("You're from "+STR$(UserBlock.CityState), No,Yes,10)
  6183.  
  6184.         See Also: WriteUsers
  6185.  
  6186.  
  6187.         Sorter
  6188.  
  6189.         Purpose: To sort numbers into descending order
  6190.  
  6191.         Syntax: CALL Sorter(ParArray$(), Number.To.Sort)
  6192.  
  6193.         Remarks: If you need to sort numbers parsed with parser, or other
  6194.         numbers in a STRING array, then call this routine and it will
  6195.         sort it into a descending order.
  6196.  
  6197.         Parameters Passed:
  6198.                 ParArray$() - The array of numbers to be sorted
  6199.  
  6200.                 Number.To.Sort - The number of array elements to sort
  6201.  
  6202.         Parameters Returned:
  6203.                 ParArray$() - The sorted array
  6204.  
  6205.         Example:
  6206.                 ParArray$(1) = "400"
  6207.                 ParArray$(2) = "200"
  6208.                 ParArray$(3) = "600"
  6209.                 CALL Sorter(ParArray$(), 3)
  6210.                 FOR X=1 TO 3
  6211.                    CALL Send(ParArray$(X), No, Yes, 10)
  6212.                 NEXT X
  6213.                 ' Output would be this:
  6214.                 ' 600
  6215.                 ' 400
  6216.                 ' 200
  6217.  
  6218.  
  6219.         SysopPage
  6220.  
  6221.         Purpose: To page the sysop if the page bell is on
  6222.  
  6223.         Syntax: CALL SysopPage(Answered)
  6224.  
  6225.         Remarks: This routine will check the page bell, and if on, will
  6226.         page the sysop using the paging sounds. If the page wasn't answered
  6227.         or the sysop isn't around then it will return a 0 in the parameter.
  6228.         This routine is affect by several global variables, which are:
  6229.                 PageSound.1 - Sound #1 to be in the "beep" sound of the page
  6230.  
  6231.                 PageSound.2 - Sound #2 to be in the "beep" sound of the page
  6232.  
  6233.                 PageSound.3 - Sound #3 to be in the "beep" sound of the page
  6234.  
  6235.                 Page.String$ - String to show while paging the sysop
  6236.  
  6237.                 Not.Around$ - String to show when the sysop is not around
  6238.  
  6239.         Parameters Passed: None
  6240.  
  6241.         Parameters Returned:
  6242.                 Answered - If the page was answered
  6243.                            (1 = Yes  0 = No)
  6244.  
  6245.         Example:
  6246.                 CALL SysopPage(Answered)
  6247.  
  6248.  
  6249.         TimeConvert
  6250.  
  6251.         Purpose: To convert from two variables into the HH:MM format
  6252.  
  6253.         Syntax: CALL TimeConvert(Hours, Minutes, NewTime$)
  6254.  
  6255.         Remarks: This will combine hours and minutes into the HH:MM format.
  6256.  
  6257.         Parameters Passed:
  6258.                 Hours - The hour
  6259.  
  6260.                 Minutes - The minute
  6261.  
  6262.         Parameters Returned:
  6263.                 NewTime$ - The hour and minute in HH:MM format
  6264.  
  6265.         Example:
  6266.                 Hours = 10
  6267.                 Minutes = 30
  6268.                 CALL TimeConvert(Hours, Minutes, NewTime$)
  6269.                 CALL Send(NewTime$+" is the next event time.", No, Yes, 10)
  6270.  
  6271.         See Also: GetTime
  6272.  
  6273.  
  6274.         ViewFile
  6275.  
  6276.         Purpose: To display a file to the local and remote screens
  6277.  
  6278.         Syntax: CALL ViewFile(FileName$, ANSICheck, MorePrompts, ExitPrompt)
  6279.  
  6280.         Remarks: This will display a ANSI or non-ANSI screen to both screens.
  6281.         If you specify to check for a ANSI version of the file, then Door
  6282.         Source will take the filename given, add a G to it, and look for
  6283.         the existence of that file for ANSI users. You can enable more
  6284.         prompts for documentation, or leave them off for long ANSI screens.
  6285.         The exit prompt is a "Press [ANY KEY] to continue" prompt that
  6286.         is display at the end of the file if told to do so. The user can
  6287.         abort the screen at any point by pressing the space bar, CTRL-X, or
  6288.         CTRL-K. If the No.Abort global variable is set to 1 (Yes) then
  6289.         the user can't abort the display. ANSI files should NOT exceed
  6290.         80 characters in length per line.
  6291.  
  6292.         Parameters Passed:
  6293.                 FileName$ - Drive/Path/Filename of file to display
  6294.  
  6295.                 ANSICheck - Check for ANSI version of file for ANSI users
  6296.                             (1 = Yes  0 = No)
  6297.  
  6298.                 MorePrompts - Display more prompts every 23 lines
  6299.                               (1 = Yes  0 = No)
  6300.  
  6301.                 ExitPrompts - Displays a "Press [ANY KEY]" prompt at end of
  6302.                               display (1 = Yes  0 = No)
  6303.  
  6304.         Parameters Returned: None
  6305.  
  6306.         Example:
  6307.                 FileName$ = "MYFILE"
  6308.                 CALL ViewFile(FileName$, Yes, No, Yes)
  6309.                 FileName$ = "MYDOCS.DOC"
  6310.                 CALL ViewFile(FileName$, No, Yes, Yes)
  6311.  
  6312.  
  6313.         WaitASec
  6314.  
  6315.         Purpose: To delay the program the specified number of seconds
  6316.  
  6317.         Syntax: CALL WaitASec(Number.Of.Seconds)
  6318.  
  6319.         Remarks: Using the SLEEP command, or a FOR loop to delay a program
  6320.         isn't often a good idea in a door because the user could drop carrier.
  6321.         This routine will delay the program correctly for the number of
  6322.         seconds specified and will also keep track of the carrier signal.
  6323.  
  6324.         Parameters Passed:
  6325.                 Number.Of.Seconds - Number of seconds to delay program
  6326.  
  6327.         Parameters Returned: None
  6328.  
  6329.         Example:
  6330.                 CALL WaitASec(5)        ' delay 5 seconds
  6331.  
  6332.  
  6333.         Windows
  6334.  
  6335.         Purpose: To draw window on the local and remote screens
  6336.  
  6337.         Syntax: CALL Windows(ULR, ULC, LRR, LRC, Fore, Back, Border, Shadow)
  6338.  
  6339.         Remarks: This will draw a border enclosed area on the screen, and
  6340.         will even make a shadow if requested. Printing and input is done
  6341.         inside the window with WindowPrint and WindowInput. This is a
  6342.         ANSI only routine, and shouldn't be used with non-ANSI users.
  6343.  
  6344.         Parameters Passed:
  6345.                 ULR - Upper Lefthand row
  6346.  
  6347.                 ULC - Upper Lefthand column
  6348.  
  6349.                 LRR - Lower Righthand row
  6350.  
  6351.                 LRC - Lower Righthand column
  6352.  
  6353.                 Fore - Foreground color to use for border
  6354.  
  6355.                 Back - Background color to use for border and to fill inside
  6356.  
  6357.                 Border - The border number
  6358.                          1 - Single line
  6359.                          2 - Double line
  6360.                          3 - Double horizontal, Single vertical
  6361.                          4 - Single horizontal, Double vertical
  6362.  
  6363.                 Shadow - Makes a shadow on the window
  6364.                          (1 = Yes  0 = No)
  6365.  
  6366.         Parameters Returned: None
  6367.  
  6368.         Example:
  6369.                 ULR = 10: ULC = 10
  6370.                 LRR = 20: LRC = 70
  6371.                 CALL Windows(ULR, ULC, LRR, LRC, 11, 1, 4, Yes)
  6372.  
  6373.         See Also: WindowInput, WindowPrint
  6374.  
  6375.  
  6376.         WriteUsers
  6377.  
  6378.         Purpose: To write to PCBoard 14.x user file
  6379.  
  6380.         Syntax: CALL WriteUsers(ErrCode)
  6381.  
  6382.         Remarks: This will write the user's record to the PCBoard user file
  6383.         specified in the global variable UserFile$. The data written will be
  6384.         from the global type declaration UserBlock (Which is shown in Appendix
  6385.         D - Variable Reference). For other bbs types, most of the data is
  6386.         written when ExitDoor is called, and calling a routine to write to
  6387.         the users file is not necessary. The best way to set UserFile$ is
  6388.         to add on another line to the configuration file and read it in
  6389.         yourself after the first call to ClrScrn.
  6390.  
  6391.         Parameters Passed: None
  6392.  
  6393.         Parameters Returned:
  6394.                 ErrCode - This is the error code is a error occurred
  6395.                           1 - Users file not found
  6396.                           2 - Wrong BBS type
  6397.                           3 - UserFile$ not set to Drive/Path/Filename of users
  6398.                               file
  6399.  
  6400.         Example:
  6401.                 See BLCKDEMO.BAS
  6402.  
  6403.                 ' UserFile$ already set earlier in the program
  6404.                UserBlock.CityState = "Anytown, USA"
  6405.                CALL ReadUsers(ErrCode)
  6406.  
  6407.         See Also: ReadUsers
  6408.  
  6409.  
  6410.         BlockSend
  6411.  
  6412.         Purpose: To send a large amount of information to both displays
  6413.  
  6414.         Syntax: CALL BlockSend(Array$(), Center, Lines.To.Send)
  6415.  
  6416.         Remarks: This will send a large pre-programmed amount of data
  6417.         to the local and remote displays. Color can only be set and
  6418.         changed via @X codes. This routine is good for programmed in
  6419.         documentation, or menus.
  6420.  
  6421.         Parameters Passed:
  6422.                 Array$() - The array to be displayed
  6423.  
  6424.                 Center - Center text to be displayed
  6425.  
  6426.                 Lines.To.Send - Number of array elements to display
  6427.  
  6428.         Parameters Returned: None
  6429.  
  6430.         Example:
  6431.                 Array$(1) = "This will be displayed"
  6432.                 Array$(2) = "Using the BlockSend routine"
  6433.                 CALL BlockSend(Array$(), No, 2)
  6434.  
  6435.         See Also: ColorEasy, RainbowSend, Send, QSend
  6436.  
  6437.  
  6438.         WindowPrint
  6439.  
  6440.         Purpose: To display text inside of a window
  6441.  
  6442.         Syntax: CALL WindowPrint(Text$, Row, Col, Fore, Back)
  6443.  
  6444.         Remarks: This is an easy way of displaying text anywhere inside of
  6445.         a window made with the Windows routine. It can also be used for
  6446.         quick short displays that aren't at the current cursor location.
  6447.  
  6448.         Parameters Passed:
  6449.                 Text$ - Text to be displayed
  6450.  
  6451.                 Row - Row to display at (horizontal)
  6452.  
  6453.                 Col - Column to display at (vertical)
  6454.  
  6455.                 Fore - Foreground color to display with
  6456.  
  6457.                 Back - Background color to display with
  6458.  
  6459.         Parameters Returned: None
  6460.  
  6461.         Example:
  6462.                 Text$ = "This will be displayed"
  6463.                 Row = 12: Col = 12: Fore = 15: Back = 1
  6464.                 CALL WindowPrint(Text$, Row, Col, Fore, Back)
  6465.  
  6466.         See Also: Windows, WindowInput
  6467.  
  6468.  
  6469.         WindowInput
  6470.  
  6471.         Purpose: To display a prompt and get input from inside a window
  6472.  
  6473.         Syntax: CALL WindowInput(Text$, MaxLength, Row, Col, Fore, Back)
  6474.  
  6475.         Remarks: This works just like the Incomm routine, but does the
  6476.         I/O inside of a window created with the Windows routine. The
  6477.         MaxLength should be just right so that input won't overflow the
  6478.         window border and cause problems with erasing it.
  6479.  
  6480.         Parameters Passed:
  6481.                 Text$ - Prompt to be displayed
  6482.  
  6483.                 MaxLength - Maximum number of characters allowed in input
  6484.  
  6485.                 Row - Row to display at (horizontal)
  6486.  
  6487.                 Col - Column to display at (vertical)
  6488.  
  6489.                 Fore - Foreground color to display prompt in
  6490.  
  6491.                 Back - Background color to display prompt in
  6492.  
  6493.         Parameters Returned:
  6494.                 ARG$ - The input received
  6495.  
  6496.         Example:
  6497.                 Text$ = "Enter your name:"
  6498.                 MaxLength = 25: Row = 13: Col = 12
  6499.                 Fore = 15: Back = 1
  6500.                 CALL WindowInput(Text$, MaxLength, Row, Col, Fore, Back)
  6501.  
  6502.         See Also: Windows, WindowPrint
  6503.  
  6504.  
  6505.         RainbowSend
  6506.  
  6507.         Purpose: To display text in a color, rainbow like form
  6508.  
  6509.         Syntax: CALL RainbowSend(Text$, Bell, Enter, Color.To.Use)
  6510.  
  6511.         Remarks: This is a creative way to display text to both displays.
  6512.         It will take the color given to use, and rotate through the colors
  6513.         making a very colorful display. Experiment with different colors
  6514.         to find the most desirable effect.
  6515.  
  6516.         Parameters Passed:
  6517.                 Text$ - Text to be displayed
  6518.  
  6519.                 Bell - Sound the remote speaker, and local is page bell is on
  6520.  
  6521.                 Enter - Send a CR/LF sequence once displaying is done
  6522.  
  6523.                 Color.To.Use - Foreground color to display text in
  6524.  
  6525.         Parameters Returned: None
  6526.  
  6527.         Example:
  6528.                 Text$ = "This will be displayed"
  6529.                 CALL RainbowSend(Text$, No, Yes, 10)
  6530.  
  6531.         See Also: BlockSend, ColorEasy, Send, QSend
  6532.  
  6533.  
  6534.         PromptIncomm
  6535.  
  6536.         Purpose: To provide a very formatted input field with a prompt
  6537.  
  6538.         Syntax: CALL PromptIncomm(Text$, Default$, DefaultColor, MaxLength,
  6539.                 Color.To.Use)
  6540.  
  6541.         Remarks: This will make a little ( ) area for input to be inside of
  6542.         for ANSI users, non-ANSI users will just have a regular prompt. This
  6543.         routine also allows to easily add a "default" to the prompt.
  6544.  
  6545.         Parameters Passed:
  6546.                 Text$ - Prompt to display
  6547.  
  6548.                 Default$ - "Default" field. Some predefined ones are:
  6549.                            Default1 = (Enter=no)
  6550.                            Default2 = (Enter=none)
  6551.                            Default3 = (Enter=quits)
  6552.  
  6553.                 DefaultColor - Foreground color for default text
  6554.  
  6555.                 MaxLength - Maximum number of characters (Required to be
  6556.                             greater than 0)
  6557.  
  6558.                 Color.To.Use - Foreground color for prompt
  6559.  
  6560.         Parameters Returned:
  6561.                 ARG$ - The input received
  6562.  
  6563.         Example:
  6564.                 See PRMTDEMO.BAS
  6565.  
  6566.                 Text$ = "Enter your name"
  6567.                 CALL PromptIncomm(Text$, Default3, 15, 10, 11)
  6568.                 IF AllTrun$(ARG$) = "" THEN
  6569.                    ' Process default
  6570.                 ELSE
  6571.                    ' Process other
  6572.                 END IF
  6573.                 ' This would output
  6574.                 ' Enter your name (Enter=quits) ? (         )
  6575.                 ' The input would be displayed inside the ( )
  6576.  
  6577.         See Also: EntryIncomm, Incomm
  6578.  
  6579.  
  6580.         EntryIncomm
  6581.  
  6582.         Purpose: To provide a field showing maximum length of input for prompt
  6583.  
  6584.         Syntax: CALL EntryIncomm(Text$, MaxLength, FieldColor, Color.To.Use)
  6585.  
  6586.         Remarks: This is a handy routine to for larger fields (3 characters and
  6587.         larger) that lets the user know what the limit is on the field size by
  6588.         printing above the prompt a (------) field indicator showing the
  6589.         maximum number of characters allowed.
  6590.  
  6591.         Parameters Passed:
  6592.                 Text$ - Prompt to display
  6593.  
  6594.                 MaxLength - Maximum number of characters to allow for input
  6595.                             (Required to be greater than 1)
  6596.  
  6597.                 FieldColor - The color of the (---) field above the prompt
  6598.  
  6599.                 Color.To.Use - The foreground color for the prompt itself
  6600.  
  6601.         Parameters Returned:
  6602.                 ARG$ - The input received
  6603.  
  6604.         Example:
  6605.                 See PRMTDEMO.BAS
  6606.  
  6607.                 Text$ = "Enter your name:"
  6608.                 CALL EntryIncomm(Text$, 20, 10, 11)
  6609.                 ' This would output
  6610.                 '                (--------------------)
  6611.                 ' Enter your name:
  6612.  
  6613.         See Also: PromptIncomm, Incomm
  6614.  
  6615.  
  6616.         ShellToDOS
  6617.  
  6618.         Purpose: To efficiently shell to DOS in order to avoid conflicts
  6619.  
  6620.         Syntax: CALL ShellToDOS(Shell.String$)
  6621.  
  6622.         Remarks: This will let Door Source completely wrap up all of its
  6623.         operations (actually close the com port, but uphold DTR and carrier)
  6624.         so that shelling to a external file transfer program is possible
  6625.         without a conflict of interrupts. This command duplicates what
  6626.         a SHELL command would do in BASIC, but gives Door Source a chance
  6627.         to clean up itself.
  6628.  
  6629.         Parameters Passed:
  6630.                 Shell.String$ - This is the command to be executed once the
  6631.                                 shell is started
  6632.  
  6633.         Parameters Returned: None
  6634.  
  6635.         Example:
  6636.                 Shell.String$ = "DIR >OUTPUT.TXT"
  6637.                 CALL ShellToDOS(Shell.String$)
  6638.  
  6639.  
  6640.  
  6641.  
  6642.                 ░▒▓                                      ▓▒░
  6643.                 ░▒▓ End of Door Source 4.0 Documentation ▓▒░
  6644.                 ░▒▓                                      ▓▒░
  6645.